按照Yeoman的“入门”指示,获得最新稳定的npm和凉亭。但是,在运行npm install
`npm install
\> node-sass@3.2.0 install /Users/zifei/Dev/projects/Woyao-
web/node_modules/grunt-sass/node_modules/node-sass
\> node scripts/install.js
Cannot download "https://github.com/sass/node-sass/releases/download
/v3.2.0/darwin-x64-45_binding.node": HTTP error 404 Not Found
\> node-sass@3.2.0 postinstall /Users/zifei/Dev/projects/Woyao-
web/node_modules/grunt-sass/node_modules/node-sass
\> node scripts/build.js
Building: /Users/zifei/.nvm/versions/io.js/v3.0.0/bin/iojs
node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags=
--libsass_ldflags= --libsass_library=
gyp: /Users/zifei/.node-gyp/3.0.0/common.gypi not found (cwd: /Users/zifei
/Dev/projects/Woyao-web/node_modules/grunt-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: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/zifei/Dev/projects
/Woyao-web/node_modules/grunt-sass/node_modules/node-sass/node_modules
/pangyp/lib/configure.js:345: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.4.0
gyp ERR! command "/Users/zifei/.nvm/versions/io.js/v3.0.0/bin/iojs"
"/Users/zifei/Dev/projects/Woyao-web/node_modules/grunt-sass/node_modules
/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--libsass_ext="
"--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/zifei/Dev/projects/Woyao-web/node_modules/grunt-
sass/node_modules/node-sass
gyp ERR! node -v v3.0.0
gyp ERR! pangyp -v v2.2.1
gyp ERR! not ok
Build failed
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users/zifei/.nvm/versions/io.js/v3.0.0/bin/iojs" "/Users
/zifei/.nvm/versions/io.js/v3.0.0/bin/npm" "install"
npm ERR! node v3.0.0
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! node-sass@3.2.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.2.0 postinstall script 'node
scripts/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 scripts/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! /Users/zifei/Dev/projects/Woyao-web/npm-debug.log`
答案 0 :(得分:0)
不确定这里到底发生了什么,但问题是您的计算机无法构建本机模块。您可以知道这一点,因为错误来自gyp
native binary builder for node。
我在您的案例中所做的就是尝试使用其他版本。我在这里看到你使用io.js 3.0.0,这不一定是那里最稳定的版本。我建议尝试使用另一个io.js版本或使用node.js 0.12直到官方节点4.0发布。
您也可以更新npm并重试。有时它可能是竞争条件问题。