We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
依赖环境如下
package.json "dependencies": { "egg": "^2.15.1", "egg-mongo-native": "^3.5.0", "egg-scripts": "^2.11.0" }
配置选项如下
plugin.js exports.mongo = { enable: true, package: 'egg-mongo-native', }; config.default.js exports.mongo = { client: { host: 'localhost', port: '27017', name: 'example', }, };
无法创建 mongo 数据库连接对象,然后导致 find 方法不是函数。调试时,mongo 数据类型为 object 不是 MongoDB 类型。
请问,问题出在哪里了?
The text was updated successfully, but these errors were encountered:
问题找到了,依赖中缺少 "mongodb": "^3.1.10" 导致 mongo 对象无法生成。
"mongodb": "^3.1.10"
Sorry, something went wrong.
mongodb 是 egg-mongo-native 的依赖,不应该需要手动添加。
No branches or pull requests
依赖环境如下
配置选项如下
无法创建 mongo 数据库连接对象,然后导致 find 方法不是函数。调试时,mongo 数据类型为 object 不是 MongoDB 类型。
请问,问题出在哪里了?
The text was updated successfully, but these errors were encountered: