Node.js guide 注册响应报错
Express 500 Error: db object already connecting, open cannot be called multiple times
at Db.open (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/mongodb/lib/mongodb/db.js:257:11)
at User.save (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/models/user.js:17:9)
at Object. (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/routes/index.js:45:10)
at nextMiddleware (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/middleware/router.js:175:25)
at param (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/middleware/router.js:183:17)
at pass (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/middleware/router.js:191:11)
at Object.router (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/middleware/router.js:197:7)
at next (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/http.js:204:15)
at next (/home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/middleware/session.js:322:9)
at /home/xuke/Study/缂栫▼瀛︿範璧勬枡/01.缂栫▼璇█/JavaScript/Test/microblog/node_modules/express/node_modules/connect/lib/middleware/session.js:341:9
4 回复
db 对象不能重复打开.
问题出在你的 User.save
中,请贴出源代码以便分析
竟然乱码一堆
已经解决了,社区好强大