Windows 7上的mongoose npm install失败

时间:2013-05-13 06:37:40

标签: windows install mongoose npm

我尝试使用

在Windows 64bit 7上安装mongoose
npm install mongoose

但我收到以下错误

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

> kerberos@0.0.2 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 kerberos@0.0.2

> bson@0.1.8 install C:\node_modules\mongoose\node_modules\mongodb\node_modules\bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)

npm ERR! bson@0.1.8 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the bson@0.1.8 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:\>

1 个答案:

答案 0 :(得分:0)

我在尝试安装mongoose时遇到了同样的问题。将节点更新到最新版本(目前为0.10.7)并再次安装mongoose解决了我的问题。