我正在尝试在Windows上运行meteor应用程序。
meteor --settings settings.json --port 3000
我遇到了这个错误:
λ meteor --settings settings.json --port 3000
[[[[[ C:\Users\User\code\some_service ]]]]]
=> Started proxy.
=> Exited with code: 8
W20160518-08:35:40.664(2)? (STDERR)
W20160518-08:35:40.665(2)? (STDERR) C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:278
W20160518-08:35:40.665(2)? (STDERR) throw(ex);
W20160518-08:35:40.665(2)? (STDERR) ^
W20160518-08:35:40.665(2)? (STDERR) Error: failed to connect to [localhost:27017]
W20160518-08:35:40.665(2)? (STDERR) at Object.Future.wait (C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:398:15)
W20160518-08:35:40.665(2)? (STDERR) at new MongoConnection (packages/mongo/mongo_driver.js:213:27)
W20160518-08:35:40.666(2)? (STDERR) at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
W20160518-08:35:40.666(2)? (STDERR) at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
W20160518-08:35:40.666(2)? (STDERR) at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
W20160518-08:35:40.666(2)? (STDERR) at new Mongo.Collection (packages/mongo/collection.js:102:40)
W20160518-08:35:40.666(2)? (STDERR) at AccountsServer.AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
W20160518-08:35:40.666(2)? (STDERR) at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
W20160518-08:35:40.667(2)? (STDERR) at meteorInstall.node_modules.meteor.accounts-base.server_main.js (packages/accounts-base/server_main.js:9:12)
W20160518-08:35:40.667(2)? (STDERR) at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
W20160518-08:35:40.667(2)? (STDERR) - - - - -
W20160518-08:35:40.667(2)? (STDERR) at [object Object].<anonymous> (C:\Users\User\AppData\Local\.meteor\packages\npm-mongo\1.4.43\npm\node_modules\mongodb\lib\mongodb\connection\server.js:556:74)
W20160518-08:35:40.667(2)? (STDERR) at [object Object].emit (events.js:106:17)
W20160518-08:35:40.667(2)? (STDERR) at [object Object].<anonymous> (C:\Users\User\AppData\Local\.meteor\packages\npm-mongo\1.4.43\npm\node_modules\mongodb\lib\mongodb\connection\connection_pool.js:156:15)
W20160518-08:35:40.667(2)? (STDERR) at [object Object].emit (events.js:98:17)
W20160518-08:35:40.668(2)? (STDERR) at Socket.<anonymous> (C:\Users\User\AppData\Local\.meteor\packages\npm-mongo\1.4.43\npm\node_modules\mongodb\lib\mongodb\connection\connection.js:534:10)
W20160518-08:35:40.668(2)? (STDERR) at Socket.emit (events.js:95:17)
W20160518-08:35:40.668(2)? (STDERR) at net.js:441:14
W20160518-08:35:40.668(2)? (STDERR) at process._tickCallback (node.js:458:13)
根据堆栈跟踪,我得出结论:它无法与MongoDB建立连接。我进行了一些调查,他们说应该将Mongo版本从3.2降级到3.0,因为3.2不兼容。
如果这是一个问题,请问我如何在Meteor中更改Mongo版本?
如果问题是其他方面的,请给出建议。
我正在使用METEOR@1.3.2.4和node v0.10.43。该应用程序在Mac和Ubuntu上运行良好。