【问题标题】:NodeJS OSX error building node-sassNodeJS OSX错误构建node-sass
【发布时间】:2016-03-16 04:35:00
【问题描述】:
我正在运行 OSX 10.11.1 并尝试 npm install 一个在 package.json 中包含 node-sass 依赖项的项目:
“依赖”:{
“节点萨斯”:“^3.4.2”
}
我正在运行 NPM 版本 2.14.7 和节点版本 4.2.3。当我运行 npm install 或 npm rebuild node-sass 时,我得到以下错误输出:
> node-sass@2.1.1 安装后 /Users/markroper/code/mktg/node_modules/gulp-sass/node_modules/node-sass
> 节点脚本/build.js
gyp: /Users/markroper/.node-gyp/4.2.3/common.gypi not found (cwd: /Users/markroper/code/mktg/node_modules/gulp-sass/node_modules/node-sass) 同时阅读包括绑定.gyp 尝试加载 binding.gyp
吉普错误!配置错误
吉普错误!堆栈错误:`gyp` 失败,退出代码:1
吉普错误! ChildProcess.onCpExit 的堆栈(/Users/markroper/code/mktg/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/lib/configure.js:346:16)
吉普错误!堆栈在 emitTwo (events.js:87:13)
吉普错误! ChildProcess.emit (events.js:172:7) 的堆栈
吉普错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
吉普错误!系统达尔文 15.0.0
吉普错误!命令“/usr/local/bin/node”“/Users/markroper/code/mktg/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp”“重建”
吉普错误! cwd /Users/markroper/code/mktg/node_modules/gulp-sass/node_modules/node-sass
吉普错误!节点-v v4.2.3
吉普错误! pangyp -v v2.3.3
吉普错误!不好
构建失败
有人用这些版本解决了这个错误吗?
【问题讨论】:
-
我恢复到版本12.22.1 用于节点和版本6.14.12 用于npm 和node-sass 安装正确。关注此link 以获取使用homebrew 恢复到旧版本节点的帮助
标签:
node.js
node-sass