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. . .
Read More:
- [Solved] ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘
- [Solved] Error: Cannot find module ‘vue-template-compiler/package.json‘ Require stack:
- [Solved] Vue Install loader Error: Syntax Error: Error: Cannot find module ‘less‘
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- Vue project Run Error: Syntax Error: Error: Cannot find module ‘less‘
- [Solved] Vue calls style loader error: Module build failed: CssSyntaxError
- [Solved] Vue package error: Syntax Error: Error: Cannot find module ‘mozjpeg’
- [Solved] Syntax Error: Error: Cannot find module ‘cache-loader‘
- [Solved] Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs extension
- [webpack-cli] Error: Cannot find module ‘vue/compiler-sfc‘
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils‘
- [Solved] VS Code Error: Vetur can‘t find ‘tsconfig.json‘ or ‘jsconfig.json‘
- [Solved] Vue project configurate test environment and package error
- [Solved] This.getoptions is not a function when installing sass loader and less loader
- [Solved] webpack Package Error: TypeError: this.getOptions is not a function style-loader
- [Solved] Module build failed TypeError this.getOptions is not a function at Object.loader
- [Solved] Vue Project Error: This relative module was not found