Syntax Error: Error: Node Sass version x.x.x is incompatible with ^4.0.0.解决办法

Syntax Error: Error: Node Sass version 9.0.0 is incompatible with ^4.0.0.
 @ ./src/assets/css/global.scss 4:14-235 15:3-20:5 16:22-243
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://192.168.7.103:8081&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Syntax Error: Error: Node Sass version x.x.x is incompatible with ^4.0.0.解决办法_第1张图片

1.卸载原来的安装

代码如下(示例):

npm uninstall node-sass
  • 1

2.重新安装

代码如下(示例):

npm i -D sass

结果如下

Syntax Error: Error: Node Sass version x.x.x is incompatible with ^4.0.0.解决办法_第2张图片

你可能感兴趣的:(前端,vue,sass,webpack,javascript)