-
Notifications
You must be signed in to change notification settings - Fork 498
Closed
Description
When creating a Vue / Typescript / ESLint project with create-vue it will have a Cannot find module 'vue'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?ts(2792)
in it by default.
Steps to Reproduce
- Start a create-vue project with the following settings:
$ npm create vue@latest
Vue.js - The Progressive JavaScript Framework
√ Project name: ... create-vue-test
√ Add TypeScript? ... Yes
√ Add JSX Support? ... No
√ Add Vue Router for Single Page Application development? ... No
√ Add Pinia for state management? ... No
√ Add Vitest for Unit Testing? ... No
√ Add an End-to-End Testing Solution? » No
√ Add ESLint for code quality? ... Yes
√ Add Prettier for code formatting? ... Yes
- Follow the installation steps.
- Following the
readme.md
enable Volar's takeover mode
Expected Behavior
An error free project.
Current Behavior
There will be an error in VS Code in the main.ts
file.
Context (Environment)
Windows 10 19045
$ node --version
v18.13.0
$ npm --version
9.3.1
Possible Solution
Under these conditions compilerOptions.moduleResolution
in tsconfig.app.json
should be set to node
by default.
Metadata
Metadata
Assignees
Labels
No labels