新建了一个vue3+ts的项目,把node-module删了之后重新install,再运行,发现报错了
Cannot find module ‘vue-loader-v16/package.json’
需要在package.json里的devDependencies中加上 “vue-loader-v16”: “^16.0.0-beta.5.4”
"devDependencies": {
...
"vue-loader-v16": "^16.0.0-beta.5.4",
...
}
再次install 再运行,还有报错
Cannot find module ‘fork-ts-checker-webpack-plugin-v5’
我package.json里的devDependencies中的"@vue/cli-plugin-typescript"是"~4.5.0",于是把它改成 “~4.4.0”
"devDependencies": {
...
"@vue/cli-plugin-typescript": "~4.4.0",
...
}