0

我尝试通过使用在 Windows 64bit 7 上安装猫鼬

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:\>
4

1 回答 1

0

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

于 2013-05-18T12:59:19.597 回答