Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0

在执行命名npm run dev 启动前端项目时,报下面的错误

Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.

从提示上来看,就是下载了最新的依赖目前版本不兼容,后来查了相关文档确实是版本过高导致;

简单方法就是找到适配的版本,指定版本安装(不知道版本就多试几次)

处理步骤如下:

#卸载
npm uninstall node-sass

#指定版本安装
npm install [email protected] --save-dev

再进行npm run dev即可运行

猜你喜欢

转载自blog.csdn.net/c851204293/article/details/120458972