MMO服务器崩溃node.js和mongodb

时间:2015-09-29 11:51:51

标签: node.js mongodb jetbrains-ide mmo

所以香港专业教育学院一直在关注这个教程系列的家伙,它的系列一直没有帮助但是当我运行时我收到此错误,有没有人之前有过这个错误或者知道如何修复它请帮帮我

"C:\Program Files (x86)\JetBrains\WebStorm 10.0.4\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" server.js --env=test
test
Loading Initializer: 00_packetmodels.js
Loading Initializer: 01_mongodb.js
js-bson: Failed to load c++ bson extension, using pure JS version
Loading Model: user.js
Loading Map: prison_1.js
Initialize Completed, Server runnng on port: 8082 for environment: test
c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\base.js:246
        throw message;      
        ^

TypeError: Cannot read property 'length' of undefined
    at processResults (c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\db.js:1581:31)
    at c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\db.js:1619:20
    at c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\db.js:1157:7
    at c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\db.js:1890:9
    at Server.Base._callHandler (c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\base.js:448:41)
    at c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\server.js:481:18
    at MongoReply.parseBody (c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\responses\mongo_reply.js:68:5)
    at null.<anonymous> (c:\Users\poeketis\WebstormProjects\Prison rp\node_modules\mongoose\node_modules\mongodb\lib\mongodb\connection\server.js:439:20)
    at emitOne (events.js:77:13)
    at emit (events.js:169:7)

Process finished with exit code 1

这是mongo日志的图片 http://i.imgur.com/ZXcBojJ.png

1 个答案:

答案 0 :(得分:1)

这是一个非常常见的问题(https://www.google.com.ua/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=js-bson%3a%20failed%20to%20load%20c%2b%2b%20bson%20extension%2c%20using%20pure%20js%20version)。 如果bson是针对与您运行应用程序的版本不同的Node版本编译的,则经常会出现此类问题。