npm ERR! Failed at the node-sass@4.14.1 postinstall script

发布于:2023-03-24 ⋅ 阅读:(570) ⋅ 点赞:(0)

问题

开发个老项目,npm i 后出现

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.

开发老项目,遇到这个问题N次了,一直没有记录,这次记录下:

问题解决

切了半天node版本,查了半天后,发现解决方案:

  1. node版本<=14
  2. 当前目录下对node-sass进行数据源设置

    npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass

    问题解决~~~


网站公告

今日签到

点亮在社区的每一天
去签到