Skip to content

Node v20.18.0 is incompatible with vue-tsc and causes vue-tsc errors when using @quasar/[email protected] #18122

@kftang

Description

@kftang

What happened?

Using @quasar/[email protected] with node v20.18.0 causes vue-tsc to emit errors related to the @vitejs/plugin-vue library.

$ npx vue-tsc -p .
node_modules/@vitejs/plugin-vue/dist/index.d.ts:120:94 - error TS1003: Identifier expected.

120 export { Api, Options, ResolvedOptions, type VueQuery, vuePlugin as default, vuePluginCjs as "module.exports", parseVueRequest };
                                                                                                 ~~~~~~~~~~~~~~~~

node_modules/@vitejs/plugin-vue/dist/index.d.ts:120:110 - error TS1005: ';' expected.

120 export { Api, Options, ResolvedOptions, type VueQuery, vuePlugin as default, vuePluginCjs as "module.exports", parseVueRequest };
                                                                                                                 ~

node_modules/@vitejs/plugin-vue/dist/index.d.ts:120:128 - error TS1128: Declaration or statement expected.

120 export { Api, Options, ResolvedOptions, type VueQuery, vuePlugin as default, vuePluginCjs as "module.exports", parseVueRequest };
                                                                                                                                   ~


Found 3 errors in the same file, starting at: node_modules/@vitejs/plugin-vue/dist/index.d.ts:120

even when node_modules/ is excluded and skipLibCheck = true

Upon running npm install, I do see the following warnings:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@vitejs/[email protected]',
npm warn EBADENGINE   required: { node: '^20.19.0 || >=22.12.0' },
npm warn EBADENGINE   current: { node: 'v20.18.0', npm: '10.8.2' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '[email protected]',
npm warn EBADENGINE   required: { node: '^20.19.0 || >=22.12.0' },
npm warn EBADENGINE   current: { node: 'v20.18.0', npm: '10.8.2' }
npm warn EBADENGINE }

What did you expect to happen?

vue-tsc should not check files within node_modules/

Reproduction URL

https://codesandbox.io/p/devbox/interesting-spence-f98fyy?workspaceId=ws_V7Xv6j1FwQXfmpt47Jcd3C

How to reproduce?

$ npm init quasar@latest
...
✔ What would you like to build? › App with Quasar CLI, let's go!
✔ Project folder: … quasar-project
✔ Pick script type: › Typescript
✔ Pick Quasar App CLI variant: › Quasar App CLI with Vite
✔ Package name: … quasar-project
✔ Project product name: (must start with letter if building mobile apps) … Quasar App
✔ Project description: … A Quasar Project
✔ Pick a Vue component style: › Composition API with <script setup>
✔ Pick your CSS preprocessor: › None (the others will still be available)
✔ Check the features needed for your project: › Linting (vite-plugin-checker + ESLint + vue-tsc)
✔ Add Prettier for code formatting? … no
...

$ cd quasar-project

$ npx vue-tsc -p .
node_modules/@vitejs/plugin-vue/dist/index.d.ts:120:94 - error TS1003: Identifier expected.

120 export { Api, Options, ResolvedOptions, type VueQuery, vuePlugin as default, vuePluginCjs as "module.exports", parseVueRequest };
                                                                                                 ~~~~~~~~~~~~~~~~

node_modules/@vitejs/plugin-vue/dist/index.d.ts:120:110 - error TS1005: ';' expected.

120 export { Api, Options, ResolvedOptions, type VueQuery, vuePlugin as default, vuePluginCjs as "module.exports", parseVueRequest };
                                                                                                                 ~

node_modules/@vitejs/plugin-vue/dist/index.d.ts:120:128 - error TS1128: Declaration or statement expected.

120 export { Api, Options, ResolvedOptions, type VueQuery, vuePlugin as default, vuePluginCjs as "module.exports", parseVueRequest };
                                                                                                                                   ~


Found 3 errors in the same file, starting at: node_modules/@vitejs/plugin-vue/dist/index.d.ts:120

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

No response

Quasar info output

Relevant log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions