更新到Node v4.0.0后运行gulp-sass时出错

Jon*_*ler 7 node.js gulp node-sass gulp-sass

我更新到Node v4.0.0,之后当我在我的项目中运行gulp时,我得到一个关于gulp-sass/node-sass的错误,如下所示:

错误:libsass未找到绑定.尝试重新安装node-sass

我试图删除项目中的所有节点模块并重新安装,我收到一些错误:

npm WARN package.json package@0.0.0没有存储库字段.

npm WARN package.json package@0.0.0没有许可证字段.

npm WARN弃用CSSselect@0.4.1:该模块现在可用作'css-select'

npm WARN弃用了CSSwhat@0.4.7:该模块现在可用作'css-what'

npm WARN弃用pangyp@2.3.2:使用node-gyp @ 3 +,它可以完成所有工作

-

node-sass@2.1.1 install/Users/Jonathan/Documents/sites/wkux/ct -html-lib/node_modules/gulp-sass/node_modules/node-sass

节点脚本/ install.js

无法从https://raw.githubusercontent.com/sass/node-sass-binaries/v2.1.1/darwin-x64-node-4.0/binding.node下载文件

node-sass@2.1.1 postinstall/Users/Jonathan/Documents/sites/wkux/ct -html-lib/node_modules/gulp-sass/node_modules/node-sass

node scripts/build.js

gyp:/Users/Jonathan/.node-gyp/4.0.0/common.gypi未找到(cwd:/ Users/Jonathan/Documents/sites/wkux/ct-html-lib/node_modules/gulp-sass/node_modules/node -sass)在尝试加载binding.gyp时读取包含binding.gyp

gyp ERR!配置错误

gyp ERR!堆栈错误:gyp退出代码失败:1

gyp ERR!在ChildProcess.onCpExit堆栈(/Users/Jonathan/Documents/sites/wkux/ct-html-lib/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/lib/configure.js:346:16)

gyp ERR!堆栈在emitTwo(events.js:87:13)

gyp ERR!在ChildProcess.emit堆栈(events.js:172:7)

gyp ERR!Process.ChildProcess._handle.onexit(internal/child_process.js:200:12)中的堆栈

gyp ERR!系统达尔文14.5.0

gyp ERR!命令"/ usr/local/bin/node""/ Users/Jonathan/Documents/sites/wkux/ct-html-lib/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp ""重建"

gyp ERR!cwd/Users/Jonathan/Documents/sites/wkux/ct -html-lib/node_modules/gulp-sass/node_modules/node-sass

gyp ERR!node -v v4.0.0

gyp ERR!pangyp -v v2.3.2

gyp ERR!不好

构建失败

所有其他节点模块似乎都安装得很好.它与node-sass的东西在gulp-sass中引起了问题.

Yur*_*bin 22

删除node_modules文件夹,更新gulp-sass到package.json中的最新文件2.2.0,然后npm install再次运行.