Closed chiaraani closed 2 weeks ago
Please provide a repro, we cannot reproduce the problem with the info you provided
I used both node 20 and 22, and I got the same warning.
This is my package.json
:
"scripts": {
"lint": "eslint --ext .js,.vue ./",
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
"dev": "quasar dev -m ssr",
"build": "quasar build -m ssr",
"test:unit:ui": "vitest --ui",
"test:unit": "vitest"
},
"dependencies": {
"@quasar/extras": "^1.16.4",
"axios": "^1.2.1",
"lodash": "^4.17.21",
"pinia": "^2.0.11",
"quasar": "^2.16.0",
"vue": "^3.4.18",
"vue-i18n": "^9.0.0",
"vue-router": "^4.0.12"
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^3.3.1",
"@pinia/testing": "^0.1.4",
"@quasar/app-vite": "^1.9.0",
"@quasar/quasar-app-extension-testing-unit-vitest": "^1.0.0",
"@vitest/ui": "^1.3.1",
"@vue/test-utils": "^2.4.4",
"autoprefixer": "^10.4.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^9.0.0",
"postcss": "^8.4.14",
"prettier": "^2.5.1",
"vite-plugin-checker": "^0.6.4",
"vitest": "^1.3.1"
},
"engines": {
"node": "^22 || ^20 || ^18 || ^16",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
A repro is a repository containing a runnable example which I can study
Here I made a reproduction with Code Sand Box: Reproduction of Quasar Vitest warning
Seems like a problem with Vite 2 and its SSR mode, on which the current @quasar/app-vite
is based
Probably because Vite 2 doesn't support Node versions which support ESM and CJS natively
The new @quasar/app-vite
, currently in beta and using Vite 5, doesn't show this behavior
Since it's just a warning and that it will be fixed by next major version, I won't take action on this for now
In case this cause some actual issue, I'll get back to this and find a way to fix it
It's probably just a matter of adding a double entry point, as we do for Cypress AE, one in CommonJS and one in ESM
It shouldn't be needed for Vitest because it only supports Node versions that natively support ESM
Thanks for reporting it anyway, it's important to get this kind of feedback from the community
When I run this command I get these logs with a warning about
quasar-app-extension-testing-unit-vitest
that I should contact the author of the package:This is the warning alone: