关于前端:npm-ERR-Failed-at-the-nodesass4141-postinstall-script

5次阅读

共计 510 个字符,预计需要花费 2 分钟才能阅读完成。

问题

开发个老我的项目,npm i 后呈现

npm ERR! 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.

回头开发老我的项目,遇到这个问题 N 次了!始终没有记录,这次记录下:

问题解决

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

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

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

    问题解决~~~

如果解决了让你正在挠头的问题,托付点个赞啦!

正文完
 0