侧边栏壁纸
博主头像
波哥

大龄程序猿&自由职业者&副业达人
爱好:敲代码、搞副业
12+年开发经验,热衷自动化网络推广!

  • 累计撰写 1,810 篇文章
  • 累计创建 77 个标签
  • 累计收到 13 条评论

目 录CONTENT

文章目录

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

波哥
2021-11-28 / 0 评论 / 0 点赞 / 1,264 阅读 / 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

0

评论区