在更新到Node v4.0.0后运行gulp-sass时出错 [英] Error running gulp-sass after update to Node v4.0.0
问题描述
我更新到了Node v4.0.0,之后当我在我的项目中运行gulp时,我收到了关于gulp-sass / node-sass的错误信息,如下所示:
< blockquote>
错误:找不到 libsass
绑定。尝试重新安装 node-sass
?
模块在项目中并重新安装,我得到一些错误:
npm WARN package.json package@0.0.0没有存储库字段
npm WARN package.json package@0.0.0无许可证字段。
WARN弃用CSSselect@0.4。 1:该模块现在可用作'css-select'
npm WARN弃用CSSwhat@0.4.7:该模块现在可作为'css-what' p>
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
节点脚本/ 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) / p>
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
$ bgyp ERR! node -v v4.0.0
gyp ERR! pangyp -v v2.3.2
gyp ERR!不行
构建失败
所有其他节点模块似乎都有安装得很好。它与节点sass在一起,导致问题。
删除您的node_modules文件夹,更新 gulp-sass
添加到您的package.json中的最新版本,它是 2.2.0
,并运行 npm再次安装
。
I updated to Node v4.0.0 and after when I run gulp in my projects I get an error with regards to gulp-sass/node-sass, as follows:
Error:
libsass
bindings not found. Try reinstallingnode-sass
?
I've tried trashing all the node modules in the project and reinstalling, and I get some errors:
npm WARN package.json package@0.0.0 No repository field.
npm WARN package.json package@0.0.0 No license field.
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'
npm WARN deprecated pangyp@2.3.2: use node-gyp@3+, it does all the things
-
node-sass@2.1.1 install /Users/Jonathan/Documents/sites/wkux/ct-html-lib/node_modules/gulp-sass/node_modules/node-sass
node scripts/install.js
Can not download file from 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 not found (cwd: /Users/Jonathan/Documents/sites/wkux/ct-html-lib/node_modules/gulp-sass/node_modules/node-sass) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error:
gyp
failed with exit code: 1gyp ERR! stack at 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! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/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" "rebuild"
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! not ok
Build failed
All the other node modules seem to have installed fine. Its something with node-sass thats in gulp-sass that is causing issues.
Delete your node_modules folder, update gulp-sass
to the latest in your package.json, which is 2.2.0
, and run npm install
again.
这篇关于在更新到Node v4.0.0后运行gulp-sass时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!