当前位置:首页 > nodejs > 正文内容

Node Sass version 5.0.0 is incompatible with^4.0.0

关中浪子1年前 (2023-04-04)nodejs990
【腾讯云】2核2G4M云服务器新老同享99元/年,续费同价
找梯子最重要的就是稳定,这个已经上线三年了,一直稳定没有被封过,赶紧下载备用吧!

在执行npm run dev 后项目报了 Node Sass version 5.0.0 is incompatible with^4.0.0 这个错误,很明显是Sass 的版本过高,因此需要对 Sass的版本降级为4.0版本。

Sass 版本: https://github.com/sass/node-sass/releases

Node 对应 Sass版本:https://www.npmjs.com/package/node-sass

Node版本:https://nodejs.org/zh-cn/download/releases/

1、卸载原 Sass

npm uninstall node-sass

2、安装对应版本 Sass

npm install node-sass@版本

我下载的版本是4.12.0,所以命令为

npm install node-sass@4.12.0

再次执行 npm run dev, 发现问题已解决。


扫描二维码推送至手机访问。

版权声明:本文由码农翻生发布,如需转载请注明出处。

本文链接:https://lubojian.cn/post/238.html

分享给朋友:

相关文章

Please, upgrade your dependencies to the actual version of core-js.

core-js@2.6.12: core-js@❤️.3 is no longer maintained and not recommended for usage due to the number of issues. Because...

error:0308010C:digital envelope routines::unsupported

error:0308010C:digital envelope routines::unsupported

问题描述使用 npm run dev 或者 yarn run dev 时报错:error:0308010C:digital envelope routines::unsupportednodejs 版本为 18.12.1解决方案Google...

npm run dev 报错     Error: module property was removed from Dependency

npm run dev 报错 Error: module property was removed from Dependency

npm run dev  报错如下:Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(depe...

npm run dev ReferenceError: globalThis is not defined

请考虑将node.js的版本更新为>=12。globalThis已根据此兼容性表添加到node.js v12.0.0中。或者通过更新pm2解决npm install pm2 -gpm2 update...

EventSource 需要添加header等信息

一、原生EventSource(一)定义:MDN详解:Web API 接口参考>EventSource(二)使用方式:  const eventSource = new Ev...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。