node-sass 安装失败 Failed at the node-sass@4.9.2 postinstall script 解决方法

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

出现上述错误是因为node版本和node-sass版本不匹配

查看你的node版本

# node -v

根据下图对应表 安装你的node版本 或者改变node-sass版本


image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。