Tag Archives: Vue framework

[Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.

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

Validation error: webpack dev server invalid options

When Vue starts the project yarn serve or NPM run dev
If an error message appears when Vue starts the project: validationerror: webpack dev server invalid options
cause of the problem:
the “proxy” object value used to solve the cross domain problem in the configuration file is empty

Solution:
find config.js Modify the contents of the document( webpack.config.js Or vue.config.js )
find devserver and comment out the proxy in it

Command failed: NPM install — loglevel error — registry= https://registry.npm.taobao.org

Use the vue – cli create project has the following error: the command failed: NPM install – loglevel error – registry=https://registry.npm.taobao.org – disturl=https://npm.taobao.org/dist

the solution has the following kinds:
Make sure that the vue-cli, NPM, node, Versions had better high node must be
1. 8 + NPM install chromedriver – chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
finished to recreate the project (this approach is not once and for all)
2. NPM cache clean — force Clear the NPM cache (if it doesn’t work, it’s not a cache problem)
3. If the above two steps or not To install the following taobao source
NPM install – g CNPM – registry=https://registry.npm.taobao.org
4. Find your computer C: \ Users \ Administrator found. vuerc the file
initial is true instead of false can