src/stores/apps/tema.ts:5:25 - error TS2339: Property 'env' does not exist on type 'ImportMeta'.
5 const url = import.meta.env.VITE_APP_BACKEND_URL;
~~~
src/stores/auth.ts:5:32 - error TS2339: Property 'env' does not exist on type 'ImportMeta'.
5 const baseUrl = `${import.meta.env.VITE_API_URL}/users`;
~~~
src/stores/authUser.ts:5:32 - error TS2339: Property 'env' does not exist on type 'ImportMeta'.
5 const baseUrl = `${import.meta.env.VITE_API_URL}/users`;
~~~
src/utils/helpers/fetch-wrapper.ts:30:47 - error TS2339: Property 'env' does not exist on type 'ImportMeta'.
30 const isApiUrl = url.startsWith(import.meta.env.VITE_API_URL);
outros
src/_mockApis/components/widget/card.ts:36:19 - error TS2307: Cannot find module '@/assets/images/svgs/icon-master-card.svg' or its corresponding type declarations.
36 import icon3 from "@/assets/images/svgs/icon-master-card.svg";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/_mockApis/components/widget/card.ts:37:19 - error TS2307: Cannot find module '@/assets/images/svgs/icon-pie.svg' or its corresponding type declarations.
37 import icon4 from "@/assets/images/svgs/icon-pie.svg";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/_mockApis/headerData.ts:8:19 - error TS2307: Cannot find module '@/assets/images/profile/user-1.jpg' or its corresponding type declarations.
8 import user1 from '@/assets/images/profile/user-1.jpg';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/_mockApis/headerData.ts:9:19 - error TS2307: Cannot find module '@/assets/images/profile/user-2.jpg' or its corresponding type declarations.
9 import user2 from '@/assets/images/profile/user-2.jpg';
vite v4.1.1 building for productionâŠ
transforming (841) node_modules\vuetify\lib\components\VCounter\index.mjsnode_modules/js-sha256/src/sha256.js (83:17) Use of eval in ânode_modules/js-sha256/src/sha256.jsâ is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/js-sha256/src/sha256.js (84:17) Use of eval in ânode_modules/js-sha256/src/sha256.jsâ is strongly discouraged as it poses security risks and may cause issues with minification.
â 876 modules transformed.
rendering chunks (12)âŠ[vite:esbuild-transpile] Transform failed with 2 errors:
assets/index-!~{001}~.js:167040:24: ERROR: Top-level await is not available in the configured target environment (âchrome87â, âedge88â, âes2020â, âfirefox78â, âsafari14â + 2 overrides)
assets/index-!~{001}~.js:167046:18: ERROR: Top-level await is not available in the configured target environment (âchrome87â, âedge88â, âes2020â, âfirefox78â, âsafari14â + 2 overrides)
Top-level await is not available in the configured target environment (âchrome87â, âedge88â, âes2020â, âfirefox78â, âsafari14â + 2 overrides)
167038| });
167039| try {
167040| const authenticated = await keycloak.init({
| ^
167041| onLoad: âlogin-requiredâ
167042| });
Top-level await is not available in the configured target environment (âchrome87â, âedge88â, âes2020â, âfirefox78â, âsafari14â + 2 overrides)
167044| User is ${authenticated ? "authenticated" : "not authenticated"}
167045| );
167046| const profile = await keycloak.loadUserProfile();
| ^
167047| console.log(profile is ${profile});
167048| localStorage.setItem(âtokenâ, keycloak.token);
error during build:
Error: Transform failed with 2 errors:
assets/index-!~{001}~.js:167040:24: ERROR: Top-level await is not available in the configured target environment (âchrome87â, âedge88â, âes2020â, âfirefox78â, âsafari14â + 2 overrides)
assets/index-!~{001}~.js:167046:18: ERROR: Top-level await is not available in the configured target environment (âchrome87â, âedge88â, âes2020â, âfirefox78â, âsafari14â + 2 overrides)
at failureErrorWithLog (C:\sistemas\workspace\bedtech-novo\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:1604:15)
at C:\sistemas\workspace\bedtech-novo\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:837:29
at responseCallbacks. (C:\sistemas\workspace\bedtech-novo\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:701:9)
at handleIncomingPacket (C:\sistemas\workspace\bedtech-novo\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:756:9)
at Socket.readFromStdout (C:\sistemas\workspace\bedtech-novo\frontend\node_modules\vite\node_modules\esbuild\lib\main.js:677:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Local funcionou, mas quando fez o deploy no servidor deu este erro:
150 packages are looking for funding
run `npm fund` for details
found 35 vulnerabilities (33 moderate, 2 high)
run `npm audit fix` to fix them, or `npm audit` for details
$ npm run build --mode homologacao
> quizme@0.0.1 build /builds/prefitech/bedtech/frontend
> vue-tsc --noEmit && vite build "homologacao"
file:///builds/prefitech/bedtech/frontend/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
at async link (internal/modules/esm/module_job.js:42:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! quizme@0.0.1 build: `vue-tsc --noEmit && vite build "homologacao"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the quizme@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-10-23T17_51_32_982Z-debug.log
Run `npm audit` for details.
$ npm run build --mode homologacao
> quizme@0.0.1 build
> vue-tsc --noEmit && vite build homologacao
vite v4.1.1 building for production...
â 0 modules transformed.
Could not resolve entry module "homologacao/index.html".
error during build:
RollupError: Could not resolve entry module "homologacao/index.html".
at error (file:///builds/prefitech/bedtech/frontend/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at ModuleLoader.loadEntryModule (file:///builds/prefitech/bedtech/frontend/node_modules/rollup/dist/es/shared/node-entry.js:24881:20)
at async Promise.all (index 0)
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1
quizme@0.0.1 build
tsc && vite build --mode homologacao homologacao
src/main.ts(1,17): error TS2307: Cannot find module â./App.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(7,27): error TS2307: Cannot find module â@/layouts/full/FullLayout.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(16,31): error TS2307: Cannot find module â@/views/dashboards/Analytical.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(21,31): error TS2307: Cannot find module â@/views/apps/analise-tema/AnaliseTema.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(26,31): error TS2307: Cannot find module â@/views/apps/analise-tema/AnaliseTemaPorId.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(31,31): error TS2307: Cannot find module â@/views/apps/tema/Tema.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(36,31): error TS2307: Cannot find module â@/views/apps/tema/TemaPorId.vueâ or its corresponding type declarations.
src/router/MainRoutes.ts(41,31): error TS2307: Cannot find module â@/views/apps/tema/Tema.vueâ or its corresponding type declarations.
src/router/index.ts(10,31): error TS2307: Cannot find module â@/views/authentication/Error.vueâ or its corresponding type declarations.
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1