- 一、问题描述
- 二、解决方法
-
- 1.卸载 node-sass
- 2.重新安装 node-sass
npm install 执行报错 Failed at the node-sass@4.14.1 postinstall script:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm 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.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-05-11T01_24_13_994Z-debug.log
1.卸载 node-sass
npm uninstall node-sass
2.重新安装 node-sass
npm i node-sass@4.14.1 --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ --unsafe-perm