gpt4 book ai didi

node.js - 在 Windows 7 上使用 npm 设置 Mongo DB 时遇到问题...有什么想法吗?

转载 作者:可可西里 更新时间:2023-11-01 09:58:23 26 4
gpt4 key购买 nike

我无法通过 npm 安装 mongodb 和 mongoose。任何建议将不胜感激!我看到一篇较早的帖子,他们说要清除缓存和更新 - 这已经完成但仍然是同样的问题......下面是 mongo db install 的错误,但它几乎与 mongoose 完全相同

各种从服务器日志获取...

> mongodb@0.9.9-2 install C:\Users\petrov\Desktop\nodejs\node_modules\mongodb
> node install.js

'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! error installing mongodb@0.9.9-2

npm ERR! mongodb@0.9.9-2 install: `node install.js`
npm ERR! `cmd "/c" "node install.js"` failed with 1
npm ERR!
npm ERR! Failed at the mongodb@0.9.9-2 install script.
npm ERR! This is most likely a problem with the mongodb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls mongodb
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\petrov\\Desktop\\nodejs\\\\node.exe"
"C:\\Users\\petrov\\Desktop\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongodb"
npm ERR! cwd C:\Users\petrov\Desktop\nodejs
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! code ELIFECYCLE
npm ERR! message mongodb@0.9.9-2 install: `node install.js`
npm ERR! message `cmd "/c" "node install.js"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\petrov\Desktop\nodejs\npm-debug.log
npm not ok

最佳答案

检查安装 Node 的路径或从安装 Node 的相同目录运行命令。

关于node.js - 在 Windows 7 上使用 npm 设置 Mongo DB 时遇到问题...有什么想法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9362151/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com