2013-05-13 94 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)并再次安装猫鼬修复了我的问题。