javascript - 无法安装js-bson

标签 javascript node.js npm bson

我正在使用 Windows 7 64 位,尝试将 bson 安装为 mongodb 的依赖项。 我收到此错误:

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 等。

最佳答案

我遇到了完全相同的问题,并且记得最近我曾摆弄过我的 PATH 变量。无法运行 cmd.exe

c:\windows\system32 添加到我的 PATH 后,问题得到修复。

根据以下内容(注意 Node 问题提到了 socket.io,当我测试它时它也引起了类似的问题):

https://github.com/joyent/node/issues/4222

关于javascript - 无法安装js-bson,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14100027/

相关文章:

javascript - javascript中for循环中的匿名回调函数

node.js - 将更新的更改 pull 入已部署的 Docker 容器的最佳方法是什么?

node.js - React-Native 打包程序失败 : Duplicate module name

javascript - Angular js 在使用 foreach 完成多个 http 调用后回调

javascript - 如何使用 JS 定期更改 div 的宽度?

php - 调用fedex服务时出现Nodejs Soap模块问题

node.js - jspm 初始化返回 "jspm init has not yet been implemented"

javascript - Gridview Javascript 函数中的服务器标记问题

javascript - 使用jquery获取其他域网站的源代码

node.js - NodeJS 数据库迁移类型错误 : Cannot read property '1' of null