问题描述
我正在使用Windows 7 64bit,试图将bson安装为mongodb的依赖项.我收到此错误:
I am using Windows 7 64bit, trying to install bson as a dependencie of mongodb.I get this error:
npm WARN package.json Wochenplaner@0.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/bson
npm http 304 https://registry.npmjs.org/bson
bson@0.1.5 install C:\Users\Administrator\Dropbox\Projekte\Wochenplaner\node_m
odules\bson
node install.js || (exit 0)
CreateProcessW: Das System kann die angegebene Datei nicht finden.
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Users\Administrator\Drop
box\Projekte\Wochenplaner\node_modules\bson'
npm ERR! error rolling back bson@0.1.5 { [Error: ENOTEMPTY, rmdir 'C:\Users\Adm
inistrator\Dropbox\Projekte\Wochenplaner\node_modules\bson']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: 'C:\Users\Administrator\Dropbox\Projekte
\Wochenplaner\node_modules\bson' }
npm ERR! bson@0.1.5 install: node install.js || (exit 0)
npm ERR! cmd "/c" "node install.js || (exit 0)" failed with 127
npm ERR!
npm ERR! Failed at the bson@0.1.5 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 install.js || (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.7600
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "bson"
npm ERR! cwd C:\Users\Administrator\Dropbox\Projekte\Wochenplaner
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Administrator\Dropbox\Projekte\Wochenplaner\npm-debug.log
npm ERR! not ok code 0
我收到此日志: http://pastebin.com/B6F2C5um
出什么问题了?另外:我尝试安装0.1.1、0.1.2、0.1.3等版本.
What is the problem?Also: I tried to install versions 0.1.1, 0.1.2, 0.1.3 etc.
推荐答案
我遇到了同样的问题,并且记得最近我在弄弄我的 PATH
变量.无法运行 cmd.exe
.
I was having the same exact issue and remembered I had fiddled with my PATH
variable, recently. It was failing to run cmd.exe
.
在将 c:\ windows \ system32
添加到我的 PATH
后,此问题已得到解决.
It was fixed after adding c:\windows\system32
to my PATH
.
下面(请注意,节点问题提到了socket.io,在我测试它时也引起了类似的问题):
Per below (note the node issue mentions socket.io, which was also causing similar problems when I tested it):
https://github.com/joyent/node/issues/4222
这篇关于无法安装js-bson的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!