错误:在meteor升级到1.6.1.1之后找不到模块“mongodb”

时间:2018-05-27 12:47:30

标签: meteor

编辑 - 有一些奇怪的东西:mongo出现在package.json和.meteor / packages文件中(它应该出现在package.json中吗?它在更新之前没有出现)但是在不同的版本。这是我的package.json:

{
  "name": "something",
  "version": "1.1.1",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "@babel/runtime": "^7.0.0-beta.49",
    "babel-runtime": "^6.26.0",
    "bootstrap": "^3.3.7",
    "google-protobuf": "^3.5.0",
    "grpc": "^1.12.2",
    "grpc-tools": "^1.6.6",
    "meteor-node-stubs": "^0.3.3",
    **"mongodb": "^3.1.0-beta4",**
    "react": "^16.4.0",
    "react-dom": "^16.4.0",
    "react-progressbar.js": "^0.2.0",
    "react-router": "^3.2.1",
    "react-router-dom": "^4.2.2"
  }
}

这是我的.meteor / packages:

meteor-base@1.3.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
**mongo@1.4.2                   # The database Meteor supports right now**
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.11            # Reactive variable for tracker
tracker@1.1.3                 # Meteor's client-side reactive programming library

standard-minifier-css@1.4.0   # CSS minifier run for production mode
standard-minifier-js@2.3.1    # JS minifier run for production mode
es5-shim@4.7.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.10.6              # Enable ECMAScript2015+ syntax in app code
shell-server@0.3.1            # Server-side component of the `meteor shell` command

session@1.1.7
tarang:ssl

更新到1.6.1.1后,我的应用无法运行,因邮件崩溃而导致错误:无法找到模块“mongodb”'。

尝试运行meteor npm install,甚至拿走了整个node_modules文件夹并重新构建它。

尝试运行流星npm update。

试图运行流星npm install mongodb。

试图降级回1.6.0.1版本。

仍然找不到mongodb。

重要 - mongodb在那里,所有收藏都在那里 - 我可以通过终端用" meteor mongo"来访问它。

任何帮助?

如果有帮助 - 如果没有别的办法,可以删除数据库中的数据。

(在ubuntu 16.04上运行)

由于

1 个答案:

答案 0 :(得分:0)

In the end, the problem was not in the project but in meteor globally, so I uninstalled and re-installed meteor globally, and everything got back to normal…

Thank you all!