gulp-sass npm ERR!在node-sass@4.9.0安装脚本失败

时间:2018-05-06 09:43:01

标签: npm sass gulp node-sass

我试图在visual studio代码中从终端窗口安装gulp-sass。

其他依赖项,如autoprefixer,concat等安装没有问题,但gulp-sass一直给我这个错误。

> node-sass@4.9.0 install /usr/local/lib/node_modules/node-sass
> node scripts/install.js

sh: node: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! node-sass@4.9.0 install: `node scripts/install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the node-sass@4.9.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我在Mac上运行VSC。

请帮忙吗?我对这一切都很陌生,没有编程背景,只是前端开发。

非常感谢

3 个答案:

答案 0 :(得分:1)

我有同样的问题。我找到了这个解决方案:

sudo npm install -g node-sass@4.5.3 --unsafe-perm = true --allow-root

我刚刚更改了部分代码:

sudo npm install gulp-sass --unsafe-perm = true --allow-root

对我有用。

答案 1 :(得分:0)

[{npm install -g node-sass@4.5.3 --unsafe-perm=true --allow-root]

这个对我来说确实可以安装软件包,但是在我启动应用程序时再次失败

我尝试使用[yarn install]而不是[npm install] 该应用成功启动。

答案 2 :(得分:-1)

我得到与您相同的解决方案。我尝试在互联网上搜索,然后在这里找到http://relaxitblog.com/?p=611 然后在那之后我安装了:sudo npm install gulp-sass 之后:npm审核修复 成功

相关问题