vue项目启动报错:Error Node Sass version 6.0.1 is incompatible with ^4.0.0.

vue项目启动报错:Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.

vue项目启动报错:Error  Node Sass version 6.0.1 is incompatible with ^4.0.0.

1、错误描述

Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 2 errors                                                                      上午9:58:08

 error  in ./src/styles/common.scss

Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.


 @ ./src/main.js 30:0-30
 @ multi (webpack)-dev-server/client?http://192.168.1.3:1888&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js babel-polyfill classlist-polyfill @/mock

 error  in ./src/components/basic-container/main.vue?vue&type=style&index=0&lang=scss&

Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.


 @ ./src/components/basic-container/main.vue?vue&type=style&index=0&lang=scss& 1:0-980 1:0-980
 @ ./src/components/basic-container/main.vue
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.1.3:1888&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js babel-polyfill classlist-polyfill @/mock

2、问题原因

node-sass版本过高,卸载重装低版本

3、解决方案

3.1卸载原有的版本

卸载: npm uninstall –save node-sass

3.2安装指定的版本

cnpm install node-sass@4.12.0

大T笔记所有文章均为本人原创,转载请您注明来源,并留下原文链接地址,是对我的尊重,也是对知识的尊重,谢谢!
大T笔记 » vue项目启动报错:Error Node Sass version 6.0.1 is incompatible with ^4.0.0.

大T笔记-我的个人互联网创业和自由职业之路

关于我 我的百宝箱
大T笔记-专注个人互联网创业和自由职业