2013-05-13 132 views
0

我嘗試通過使用貓鼬NPM安裝在Windows 7上失敗

npm install mongoose 

在Windows 64位7安裝貓鼬,但我收到以下錯誤

C:\>npm install mongoose 
npm http GET https://registry.npmjs.org/mongoose 
npm http 304 https://registry.npmjs.org/mongoose 
npm http GET https://registry.npmjs.org/ms/0.1.0 
npm http GET https://registry.npmjs.org/hooks/0.2.1 
npm http GET https://registry.npmjs.org/mongodb/1.3.3 
npm http GET https://registry.npmjs.org/mpromise/0.2.1 
npm http GET https://registry.npmjs.org/muri/0.3.1 
npm http GET https://registry.npmjs.org/sliced/0.0.3 
npm http GET https://registry.npmjs.org/mpath/0.1.1 
npm http 304 https://registry.npmjs.org/mpromise/0.2.1 
npm http 304 https://registry.npmjs.org/ms/0.1.0 
npm http 304 https://registry.npmjs.org/hooks/0.2.1 
npm http 304 https://registry.npmjs.org/muri/0.3.1 
npm http 304 https://registry.npmjs.org/mongodb/1.3.3 
npm http 304 https://registry.npmjs.org/sliced/0.0.3 
npm http 304 https://registry.npmjs.org/mpath/0.1.1 
npm http GET https://registry.npmjs.org/sliced/0.0.4 
npm http GET https://registry.npmjs.org/bson/0.1.8 
npm http GET https://registry.npmjs.org/kerberos 
npm http 304 https://registry.npmjs.org/sliced/0.0.4 
npm http 304 https://registry.npmjs.org/kerberos 
npm http 304 https://registry.npmjs.org/bson/0.1.8 

> [email protected] install C:\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

npm WARN optional dep failed, continuing [email protected] 

> [email protected] install C:\node_modules\mongoose\node_modules\mongodb\node_modules\bson 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 

npm ERR! [email protected] install: `(node-gyp rebuild 2> builderror.log) || (exit 0)` 
npm ERR! spawn ENOENT 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the bson package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  (node-gyp rebuild 2> builderror.log) || (exit 0) 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls bson 
npm ERR! There is likely additional logging output above. 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongoose" 
npm ERR! cwd C:\ 
npm ERR! node -v v0.10.5 
npm ERR! npm -v 1.2.18 
npm ERR! syscall spawn 
npm ERR! code ELIFECYCLE 
npm ERR! errno ENOENT 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\npm-debug.log 
npm ERR! not ok code 0 

C:\> 

回答

0

嘗試安裝貓鼬,當我有同樣的問題。將節點更新到最新版本(當前爲0.10.7)並再次安裝貓鼬修復了我的問題。