1. Error message when running the project
Module build failed: Error:
Vue packages version mismatch:
- [email protected] (G:\workspace\BookShopManageVue\node_modules\vue\dist\vue.runtime.common.js)
- [email protected] (G:\workspace\BookShopManageVue\node_modules\[email protected]@ ;vue-template-compiler\package.json)
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template- compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
2. Reason for the error
version problems,
The currently installed VUE dependency node_modules is version 2.6.14, but the imported project uses version 2.7.10.
Just unify the two versions.
Hint: how to unify versions. Is to download and install version 2.6.14. Still version 2.7.10?
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
Check the version of vue loader in package-lock.json
. My vue loader version is higher than 10. So I’m going to unity 1.6.14 version. (I didn’t see vue loader directly download and install version 2.7.10 before. The result is the same error)
3. Solutions
- 1. Delete node_modules
- 2. Install
npm install [email protected] --save
(Need to check the version)
4. Successful operation
Read More:
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- [Solved] Vue calls style loader error: Module build failed: CssSyntaxError
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- [Solved] Vue Project Error: Module build failed: Error: Missing binding
- [Solved] Vue Error: Module build failed: Error: No PostCSS Config found in
- [Solved] Module build failed TypeError this.getOptions is not a function at Object.loader
- ArcGIS API for JavaScript version 4. X updated and the project startup error: Module parse failed: Unexpected token(… …
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Vue Run Error] Module build failed: Error: Couldn‘t resolve parser “babylon“
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [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] vue3vite Error: Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist
- [Solved] Vue Import swiper.css Error: Module not found…
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils
- Vue project Run Error: Syntax Error: Error: Cannot find module ‘less‘
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils‘
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- Solution to build error in Vue project (error in static/JS)/vendor.xxxxx.js from UglifyJs)