[英]Failed at the node-sass@0.9.6 install script 'node build.js'
I'm getting this error while running npm install
on project. 我在项目上运行
npm install
时遇到此错误。 The additional information about this issue below, 以下有关此问题的其他信息,
npm ERR! node-sass@0.9.6 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@0.9.6 install script 'node build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/capricornus/Projects/aware-app/npm-debug.log
Just install older version of Nodejs with nodebrew. 只需使用nodebrew安装旧版本的Nodejs。
curl -L git.io/nodebrew | perl - setup
Add the following to ~/.bashrc 将以下内容添加到〜/ .bashrc中
export PATH=$HOME/.nodebrew/current/bin:$PATH
Refresh console 刷新控制台
source ~/.bashrc
Install older version 安装旧版本
nodebrew install-binary v0.12.7
nodebrew use v0.12.7
Then try again! 然后再试一次!
Failed at the node-sass@0.9.6 install script 'node build.js' 在node-sass@0.9.6安装脚本'node build.js'失败
It looks like this version is no longer compatible. 看起来这个版本不再兼容了。 I get the same errors on my system.
我在系统上遇到同样的错误。 Either you need to downgrade node to the supported version, or upgrade the dependencies that require
node-sass@0.9.6
. 您需要将节点降级到支持的版本,或者升级需要
node-sass@0.9.6
的依赖node-sass@0.9.6
。
Latest version of node-sass is 3.4.2. node-sass的最新版本是3.4.2。
In case someone runs into trouble with nodebrew, it's also possible to use nvm (node version manager) to downgrade your node version. 如果有人遇到nodebrew的问题,也可以使用nvm(节点版本管理器)降级节点版本。 Project on Github
Github上的项目
On OSX El Capitan, I needed this for the installation: 在OSX El Capitan上,我需要安装它:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
. ~/.nvm/nvm.sh
Mind the last line, as it's slightly different from the install instruction on github. 记住最后一行,因为它与github上的安装指令略有不同。
As mentioned by Yosuke Sato, v0.12.7 is compatible with node-sass@0.9.6, so you'd need 如Yosuke Sato所述,v0.12.7与node-sass@0.9.6兼容,所以你需要
nvm install v0.12.7 or nvm use v0.12.7 (if you have it installed already)
This will use the older node version, but only in the current terminal window/tab . 这将使用较旧的节点版本,但仅在当前终端窗口/选项卡中使用 。
nvm use v0.12.7
in the project directory followed by npm install
solved the problem for me -- the error occurred as I was trying to set up broccoli-taco, a static site generator. nvm use v0.12.7
在项目目录中nvm use v0.12.7
后跟npm install
解决了我的问题 - 当我试图设置broccoli-taco,一个静态站点生成器时发生了错误。 Thanks for tip, I am glad I googled you up. 感谢小费,我很高兴我用Google搜索了你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.