位置:- 正文

【bug】Failed at the node-sass@4.14.1 postinstall script(终于圆满解决)(but all failed)

编辑:rootadmin
【bug】Failed at the node-sass@4.14.1 postinstall script(终于圆满解决)

推荐整理分享【bug】Failed at the node-sass@4.14.1 postinstall script(终于圆满解决)(but all failed),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:failed to index buffer,but failed to remove,failed to index buffer,failed in buffer,failed in buffer,but all failed,but failed to unregister it,but failed to unregister it,内容如对您有帮助,希望把文章链接给更多的朋友!

花了两个小时才解决 首先是从git上克隆项目到本地,然后安装nodele_modules,输入npm i安装 安装到一半报错

npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@4.14.1 postinstall script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.【bug】Failed at the node-sass@4.14.1 postinstall script(终于圆满解决)(but all failed)

这个问题不是第一次遇到了,两周前就遇到过一次,当时百度了一圈没有解决,各种方法都试了,就是解决不了。 没办法,只好把同事安装好的项目整个打包复制过来,今天因为要安装新的插件,结果又报这个错,没办法,这次必须得解决这个问题了。 看到一篇文章,很受用,就是跟着文章的思路找到解决的办法 Failed at the node-sass@4.14.1 postinstall script.(第二次入坑) 简短描述,就是node的版本太高,现在官网上直接下载的版本已经是16.14.2 node-scss匹配的最高版本才14 所以解决办法就是卸载node,安装14的版本 卸载的流程可以看这一篇,算是卸载的比较透彻了 彻底卸载node 卸载之后,去官网找指定的版本 node官网地址戳这里 我下载的是14.15.0,这个版本可用

找到node-v14.15.1-x64.msi后点击下载,一直点击下一步直到完成 安装好之后配置一下环境变量 打开电脑,右击属性—高级系统设置–环境变量–系统环境变量—path—编辑—新建—浏览 找到node的安装地址

window(笔记本键盘上的窗户logo)+r打开cmd,输入node -v npm -v查看安装是否成功

然后这个时候回到项目里,先卸载node-sass

npm uninstall node-sass

再重新安装

npm i node-sass@4.14.1 --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

最后npm i 就不报错了,顺利解决!

本文链接地址:https://www.jiuchutong.com/zhishi/295915.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/295916.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络