A Quasar project with vitest that fails due to
The requested module 'vite' does not provide an export named 'parseAstAsync'"
yarn create quasar
quasar ext add @quasar/testing-unit-vitest
Pinned package.json
version numbers to specific versions for reproducability.
Add
"resolutions": {
"@vitejs/plugin-vue": "^4.0.0",
"vite": "^4.0.0"
},
to package.json
per these instructions.
yarn test:unit:ci
gives
$ vitest run
file:///C:/Temp/q/quasar-project-with-vitest/node_modules/vitest/dist/vendor/index.c1V_jzyZ.js:23
import { parseAstAsync } from 'vite';
^^^^^^^^^^^^^
SyntaxError: The requested module 'vite' does not provide an export named 'parseAstAsync'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async main (file:///C:/Temp/q/quasar-project-with-vitest/node_modules/vitest/dist/cli-wrapper.js:45:5)
Node.js v20.10.0
error Command failed with exit code 1.