You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I use quasar version 2.10.0 vite, I tried to implement quasar calendar 4.0.0 beta-15 version but when I added the extension and installed the calendar according to the instructions, I get the following error when starting the application.
Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
D:\projects\quasar\swebscansi\node_modules\@quasar\quasar-app-extension-qcalendar\src\boot\register.js:1
import { boot } from 'quasar/wrappers'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1032:15)
at Module._compile (node:internal/modules/cjs/loader:1067:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29)
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
I tried to add "type": "module" to package.json, but then I can't start quasar application again because everything is not done as modules:
Running "@quasar/qcalendar" Quasar App Extension...
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\projects\quasar\swebscansi\quasar.config.js from D:\projects\quasar\swebscansi\node_modules\@quasar\app-vite\lib\quasar-config-file.js not supported.
quasar.config.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename quasar.config.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in D:\projects\quasar\swebscansi\package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
at QuasarConfFile.read (D:\projects\quasar\swebscansi\node_modules\@quasar\app-vite\lib\quasar-config-file.js:204:30)
at goLive (D:\projects\quasar\swebscansi\node_modules\@quasar\app-vite\lib\cmd\dev.js:142:43) {
code: 'ERR_REQUIRE_ESM'
}
App • ⚠️ FAIL quasar.config.js has JS errors
Describe the bug
I use quasar version 2.10.0 vite, I tried to implement quasar calendar 4.0.0 beta-15 version but when I added the extension and installed the calendar according to the instructions, I get the following error when starting the application.
I tried to add "type": "module" to package.json, but then I can't start quasar application again because everything is not done as modules:
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: