繁体   English   中英

在Mac上安装mongodb的问题

[英]Issue with mongodb install on Mac

我在一个终端窗口中运行了mongodb,现在在另一个终端窗口中运行server.js(我正在获取的在线Mean类中的文件)时出现此错误:

Daves-MB​​-Retina-Oct2014:平均Dave $节点server.js module.js:338 throw err; ^

错误:在Function.Module._resolveFilename(module.js:336:15)在Module.require(module.js)的Function.Module._load(module.js:286:25)处找不到模块'mongodb / node_modules / bson' :365:17),位于Object的require(module.js:384:17)。 (/用户/.../.../udemy/mean/node_modules/mongoose/lib/drivers/node-mongodb

  native/objectid.js:8:16) at Module._compile (module.js:434:26) at Object.Module._extensions..js (module.js:452:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) 

MongoDB在另一个目录中。 有关系吗 我在所在目录中进行了npm更新,没有任何更新。 目录中的内容如下:Daves-MB​​-Retina-Oct2014:mean Dave $ ls Gruntfile.js bower_components package.json许可配置包Procfile karma.conf.js server.js README.md mean.json工具bower.json node_modules

我在Stackoverflow之外获得了帮助以解决此问题。 我将所有内容重新安装在新目录中,并在安装脚本失败的几个子目录中进行了npm安装。 全部设置好了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM