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/[email protected]@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/[email protected]@egg-mongoose/lib/mongoose.js:56:16)

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

你可能感兴趣的:(eggjs使用中遇到的坑)