Vue error module build failed: error: node sass version 6.0.1 is incompatible with ^ 4.0.0. Solution
Error message:
ERROR Failed to compile with 1 errors 下午6:51:57
error in ./src/views/Login.vue
Module build failed: Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.
at getSassImplementation (D:\IDEA\IDEA Projects\Vue\hello-vue\node_modules\[email protected]@sass-loader\dist\utils.js:77:13)
at Object.loader (D:\IDEA\IDEA Projects\Vue\hello-vue\node_modules\[email protected]@sass-loader\dist\index.js:34:59)
@ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-26084dc2","scoped":true,"hasInline
Config":false}!./node_modules/[email protected]@sass-loader/dist/cjs.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/views/Login.vue 4:14-389
13:3-17:5 14:22-397
@ ./src/views/Login.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
Solution:
Find the problem: module build failed: error: node sass version 6.0.1 is incompatible with ^ 4.0.0
This problem is caused by the high version of SASS, so just change the version to the corresponding version according to the prompt. Here, change to version 4.0.0.
Step 1: find the package.json file in the IDE:
Step 2: find sass loader and change its version to 4.0.0
Finally, execute
cnpm install
Finally, execute
cnpm install
npm run dev
Read More:
- [Solved] Node sass version 7.0.0 is incompatible with ^ 4.0.0 | ^ 5.0.0 | ^ 6.0.0
- Vue installs sass loader directly, and node sass reports an error
- [Solved] Module build failed: Error: Vue packages version mismatch
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment
- [Solved] Vue calls style loader error: Module build failed: CssSyntaxError
- [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
- [Solved] Error: Node Sass does not yet support your current environment
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment:
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: OS X Unsupported archi
- [Solved] This.getoptions is not a function when installing sass loader and less loader
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: Windows 64-bit with
- ArcGIS API for JavaScript version 4. X updated and the project startup error: Module parse failed: Unexpected token(… …
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function