npm i 下载失败,报错: Failed at the node-sass@4.9.2 postinstall script....

控制台运行npm install时报错,报错信息如下: 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.

 解决方法: 1、卸载node-sass 运行:npm uninstall node-sass 

 2、重新安装指定的node-sass版本(安装失败的版本) 运行:npm install node-sass@4.12.0 

 3、如果还是安装不成功的话,或者安装太慢连接不上,使用一下淘宝镜像后重复1,2步骤,成功后再npm install 使用淘宝镜像运行:npm config set registry https://registry.npm.taobao.org



或者尝试以下方法

 

GitHub 加速计划 / no / node-sass
8.5 K
1.33 K
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:2 个月前 )
6081731a Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 9 个月前
62c0f46c Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 9 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐