jcoreio / crater

Meteor/Webpack/React SSR app skeleton that runs your app code outside of Meteor Isobuild
ISC License
82 stars 10 forks source link

windows10 MongoError #88

Closed shijunti19 closed 7 years ago

shijunti19 commented 7 years ago

windows10+cmd webpack built b8de0552b7a84df74e4c in 2635ms [smart-restart] can't execute file: F:\web\xiaolu\meteor\crater\src\index.js [smart-restart] error given was: MongoError: failed to connect to server [localhost:27017] on first connect at Object.Future.wait (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\node_modules\fibers\future.js:449:15) at new MongoConnection (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\packages\meteor:\�app\packages\mongo\mongo_driver.js:219:27) at new MongoInternals.RemoteCollectionDriver (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\packages\meteor:\�app\packages\mongo\remote_collection_driver.js:4:16) at Object. (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\packages\meteor:\�app\packages\mongo\remote_collection_driver.js:38:10) at Object.defaultRemoteCollectionDriver (packages\underscore.js:784:19) at new Mongo.Collection (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\packages\meteor:\�app\packages\mongo\collection.js:103:40) at Object. (F:/web/xiaolu/meteor/crater/src/universal/collections/Counts.js:6:16) at Module._compile (module.js:541:32) at loader (F:\web\xiaolu\meteor\crater\node_modules\babel-register\lib\node.js:144:5) at Object.require.extensions.(anonymous function) [as .js] (F:\web\xiaolu\meteor\crater\node_modules\babel-register\lib\node.js:154:7)


at .<anonymous> (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb-core\lib\topologies\server.js:313:35)
at emitOne (events.js:96:13)
at emit (events.js:188:7)
at .<anonymous> (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb-core\lib\connection\pool.js:271:12)
at g (events.js:286:16)
at emitTwo (events.js:106:13)
at emit (events.js:191:7)
at Socket.<anonymous> (F:\web\xiaolu\meteor\crater\build\meteor\bundle\programs\server\npm\node_modules\meteor\npm-mongo\node_modules\mongodb-core\lib\connection\connection.js:165:49)
at Socket.g (events.js:286:16)
at emitOne (events.js:96:13)

[smart-restart] further repeats of this error will be suppressed...

jedwards1211 commented 7 years ago

Did you start mongo before starting your app? Unlike Meteor, this skeleton requires you to start mongo separately (using the mongod command).

shijunti19 commented 7 years ago

No, I restart the computer

shijunti19 commented 7 years ago

How to deploy to the host? mupx? https://github.com/kadirahq/meteor-up Can be packaged into an app?

jedwards1211 commented 7 years ago

Just use the existing Dockerfile/docker-compose.yml (npm run build:docker) and deploy the docker image using whatever docker tools you want. I don't think it would work with mup since stuff lives outside of the meteor folder

jedwards1211 commented 7 years ago

I'm closing this, if you have another problem feel free to open a new issue for it.