Tag Archives: The vue3 project Error

The vue3 project Error: Cannot find module’vue-loader-v16/package.json’

In the past two days, I plan to learn vue3. The build project does not use vite, but builds it through vue cli. The vue cli building vue3 project is similar to the previous vue2, but vue cli needs to be upgraded to the latest version.

After the newly generated project, run an error:

Error: Cannot find module'vue-loader-v16/package.json'

Here is the tutorial on how to solve this problem here:

 

1. Upgrade npm

npm i -g npm

Those who use cnpm should also upgrade cnpm

cnpm i -g cnpm

 

2. Reinstall the node_modules dependency package

rm- rf node_modules // delete the original dependency package first

cnpm i // reinstall

 

3. Re-download

cnpm i -D vue-loader-v16

 

Then you can successfully run the project. . .