【vue3+ts+vite】Cannot find module ‘vue‘. Did you mean to set the ‘moduleResolution‘ option to ‘node‘,
Cannot find module 'vue'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
·
新建的vue3项目,
打开main.ts
import { createApp } from ‘vue’ 标红
Cannot find module ‘vue’. Did you mean to set the ‘moduleResolution’ option to ‘node’, or to add aliases to the ‘paths’ option?
解决:给 tsconfig.app.json 中的 compilerOptions里添加
“moduleResolution”: “node”
更多推荐
已为社区贡献5条内容
所有评论(0)