【问题标题】:gulp-sass npm ERR! Failed at the node-sass@4.9.0 install scriptgulp-sass npm 错误!在 node-sass@4.9.0 安装脚本失败
【发布时间】:2018-10-16 07:42:59
【问题描述】:

我正在尝试从 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。

有什么帮助吗?顺便说一句,我完全是新手,没有编程背景,只是前端开发。

非常感谢

【问题讨论】:

  • 您运行的安装命令是什么?
  • 无法保存二进制文件 /home/hh/buildtool/udacity/wittr/node_modules/node-sass/vendor/linux-x64-64 : { 错误:EACCES: 权限被拒绝,mkdir '/home/ hh/buildtool/udacity/wittr/node_modules/node-sass/vendor 我有相同的版本和关闭类型的失败。我担心的是它适用于 docker
  • 这对我有用:npm install --unsafe-perm=true

标签: npm sass gulp node-sass


【解决方案1】:

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

【讨论】:

  • 我删除了所有内容(格式实际上是因为它应该到期)然后用自制软件重新安装.. 修复了一切.. 也不需要 sudo
【解决方案2】:

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

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

我只是修改了部分代码:

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

它对我有用。

【讨论】:

  • npm install -g node-sass@4.5.3 --unsafe-perm=true --allow-root 这个对我有用
【解决方案3】:

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

这对我来说确实可以安装软件包,但是当我启动应用程序时它又失败了

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

【讨论】:

    猜你喜欢
    • 2018-11-23
    • 2021-10-14
    • 2020-02-25
    • 2019-06-22
    • 2018-06-26
    • 1970-01-01
    • 2020-01-25
    • 2018-11-06
    • 2018-08-23
    相关资源
    最近更新 更多