eggjs使用中遇到的坑

1.mongoose4.x以上启动的时候报的错误

egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] tail -n 100 /root/logs/master-stderr.log
[egg-scripts] Got error when startup:
[egg-scripts] /usr/local/www/egg_server/node_modules/_egg@2.13.0@egg/lib/application.js:69
[egg-scripts]       throw e;
[egg-scripts]       ^
[egg-scripts]
[egg-scripts] TypeError: Cannot read property 'hasOwnProperty' of undefined
[egg-scripts]     at Singleton.createOneClient [as create] (/usr/local/www/egg_server/node_modules/_egg-mongoose@3.1.1@egg-mongoose/lib/mongoose.js:56:16)

解决办法参考https://github.com/eggjs/egg/issues/3081

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容