简体   繁体   中英

meteor push to heroku: cannot find main.js

I pushed github.com/ee7klt/tachyoned to heroku at tachyoned.heroku.com and am getting an application error.

commands i ran were

heroku create tachyoned --stack cedar --buildpack https://github.com/v8squirrel/heroku-buildpack-meteor.git git remote add heroku git@heroku.com:tachyoned.git

heroku addons:add mongohq:sandbox heroku config:set MONGO_URL=mongodb://[username]:[password]@dharma.mongohq.com:10038/app123456

git push heroku master

the logs are as follows:

2013-08-07T23:33:42.131685+00:00 app[web.1]: 
2013-08-07T23:33:42.132492+00:00 app[web.1]:     throw err;
2013-08-07T23:33:42.132650+00:00 app[web.1]:           ^
2013-08-07T23:33:42.132151+00:00 app[web.1]: module.js:340
2013-08-07T23:33:42.136470+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-07T23:33:42.136470+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-07T23:33:42.136470+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-07T23:33:42.136470+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-07T23:33:42.136470+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-07T23:33:43.661641+00:00 heroku[web.1]: Process exited with status 1
2013-08-07T23:33:43.669264+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-07T23:33:51.564925+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-07T23:33:51.565183+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-07T23:43:48.945520+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-07T23:43:52.770843+00:00 heroku[web.1]: Starting process with command `PATH=.meteor/checkout:bin:/usr/local/bin:/usr/bin:/bin NODE_PATH=.meteor/checkout/dev_bundle/lib/node_modules MONGO_URL=mongodb://heroku:0e3fb1dbdff07bf0e063ea1b72f4e4f9@dharma.mongohq.com:10075/app17360457 .meteor/checkout/dev_bundle/bin/node .meteor/local/build/main.js`
2013-08-07T23:43:53.561690+00:00 app[web.1]: module.js:340
2013-08-07T23:43:53.558841+00:00 app[web.1]: 
2013-08-07T23:43:53.562348+00:00 app[web.1]:     throw err;
2013-08-07T23:43:53.562510+00:00 app[web.1]:           ^
2013-08-07T23:43:53.571503+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-07T23:43:53.571503+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-07T23:43:53.571503+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-07T23:43:53.571503+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-07T23:43:53.571503+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-07T23:43:55.184433+00:00 heroku[web.1]: Process exited with status 1
2013-08-07T23:43:55.200547+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-07T23:54:23.340451+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-07T23:54:26.451563+00:00 heroku[web.1]: Starting process with command `PATH=.meteor/checkout:bin:/usr/local/bin:/usr/bin:/bin NODE_PATH=.meteor/checkout/dev_bundle/lib/node_modules MONGO_URL=mongodb://heroku:0e3fb1dbdff07bf0e063ea1b72f4e4f9@dharma.mongohq.com:10075/app17360457 .meteor/checkout/dev_bundle/bin/node .meteor/local/build/main.js`
2013-08-07T23:54:27.460339+00:00 app[web.1]: 
2013-08-07T23:54:27.460612+00:00 app[web.1]: module.js:340
2013-08-07T23:54:27.460997+00:00 app[web.1]:           ^
2013-08-07T23:54:27.460997+00:00 app[web.1]:     throw err;
2013-08-07T23:54:27.464956+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-07T23:54:27.464956+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-07T23:54:27.464956+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-07T23:54:27.464956+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-07T23:54:27.464956+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-07T23:54:28.827639+00:00 heroku[web.1]: Process exited with status 1
2013-08-07T23:54:28.851257+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-07T23:54:36.668810+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-07T23:54:36.669232+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T00:04:31.981136+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T00:04:35.493835+00:00 heroku[web.1]: Starting process with command `PATH=.meteor/checkout:bin:/usr/local/bin:/usr/bin:/bin NODE_PATH=.meteor/checkout/dev_bundle/lib/node_modules MONGO_URL=mongodb://heroku:0e3fb1dbdff07bf0e063ea1b72f4e4f9@dharma.mongohq.com:10075/app17360457 .meteor/checkout/dev_bundle/bin/node .meteor/local/build/main.js`
2013-08-08T00:04:36.064989+00:00 app[web.1]: module.js:340
2013-08-08T00:04:36.064820+00:00 app[web.1]: 
2013-08-08T00:04:36.065232+00:00 app[web.1]:     throw err;
2013-08-08T00:04:36.065232+00:00 app[web.1]:           ^
2013-08-08T00:04:36.068426+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-08T00:04:36.068426+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-08T00:04:36.068426+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-08T00:04:36.068426+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-08T00:04:36.068426+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-08T00:04:37.315336+00:00 heroku[web.1]: Process exited with status 1
2013-08-08T00:04:37.336949+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T00:15:03.729386+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T00:15:06.818328+00:00 heroku[web.1]: Starting process with command `PATH=.meteor/checkout:bin:/usr/local/bin:/usr/bin:/bin NODE_PATH=.meteor/checkout/dev_bundle/lib/node_modules MONGO_URL=mongodb://heroku:0e3fb1dbdff07bf0e063ea1b72f4e4f9@dharma.mongohq.com:10075/app17360457 .meteor/checkout/dev_bundle/bin/node .meteor/local/build/main.js`
2013-08-08T00:15:07.828259+00:00 app[web.1]:     throw err;
2013-08-08T00:15:07.828259+00:00 app[web.1]:           ^
2013-08-08T00:15:07.827889+00:00 app[web.1]: 
2013-08-08T00:15:07.828022+00:00 app[web.1]: module.js:340
2013-08-08T00:15:07.851308+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-08T00:15:07.851308+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-08T00:15:07.851308+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-08T00:15:07.851308+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-08T00:15:07.851308+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-08T00:15:09.263358+00:00 heroku[web.1]: Process exited with status 1
2013-08-08T00:15:09.271063+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T00:15:16.938605+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-08T00:15:16.938822+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T00:25:10.987765+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T00:25:13.444061+00:00 heroku[web.1]: Starting process with command `PATH=.meteor/checkout:bin:/usr/local/bin:/usr/bin:/bin NODE_PATH=.meteor/checkout/dev_bundle/lib/node_modules MONGO_URL=mongodb://heroku:0e3fb1dbdff07bf0e063ea1b72f4e4f9@dharma.mongohq.com:10075/app17360457 .meteor/checkout/dev_bundle/bin/node .meteor/local/build/main.js`
2013-08-08T00:25:14.183806+00:00 app[web.1]: 
2013-08-08T00:25:14.183994+00:00 app[web.1]: module.js:340
2013-08-08T00:25:14.184233+00:00 app[web.1]:     throw err;
2013-08-08T00:25:14.184333+00:00 app[web.1]:           ^
2013-08-08T00:25:14.188434+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-08T00:25:14.188340+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-08T00:25:14.188611+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-08T00:25:14.188217+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-08T00:25:14.188522+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-08T00:25:15.593607+00:00 heroku[web
.1]: Process exited with status 1
2013-08-08T00:25:15.592170+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T00:25:23.604481+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-08-08T00:25:23.604793+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-08-08T00:35:16.833507+00:00 heroku[web.1]: State changed from crashed to starting
2013-08-08T00:35:19.209732+00:00 heroku[web.1]: Starting process with command `PATH=.meteor/checkout:bin:/usr/local/bin:/usr/bin:/bin NODE_PATH=.meteor/checkout/dev_bundle/lib/node_modules MONGO_URL=mongodb://heroku:0e3fb1dbdff07bf0e063ea1b72f4e4f9@dharma.mongohq.com:10075/app17360457 .meteor/checkout/dev_bundle/bin/node .meteor/local/build/main.js`
2013-08-08T00:35:19.804272+00:00 app[web.1]:     throw err;
2013-08-08T00:35:19.803916+00:00 app[web.1]: 
2013-08-08T00:35:19.804272+00:00 app[web.1]:           ^
2013-08-08T00:35:19.807308+00:00 app[web.1]: Error: Cannot find module '/app/.meteor/local/build/main.js'
2013-08-08T00:35:19.804053+00:00 app[web.1]: module.js:340
2013-08-08T00:35:19.807308+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2013-08-08T00:35:19.807308+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2013-08-08T00:35:19.807308+00:00 app[web.1]:     at Module.runMain (module.js:492:10)
2013-08-08T00:35:19.807308+00:00 app[web.1]:     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
2013-08-08T00:35:20.890080+00:00 heroku[web.1]: Process exited with status 1
2013-08-08T00:35:20.894770+00:00 heroku[web.1]: State changed from starting to crashed
2013-08-08T00:43:43.506885+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=tachyoned.herokuapp.com fwd="175.143.199.51" dyno= connect= service= status=503 bytes=
2013-08-08T00:43:44.331624+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=tachyoned.herokuapp.com fwd="175.143.199.51" dyno= connect= service= status=503 bytes=
2013-08-08T00:43:55.821151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=tachyoned.herokuapp.com fwd="175.143.199.51" dyno= connect= service= status=503 bytes=
2013-08-08T00:43:56.658774+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=tachyoned.herokuapp.com fwd="175.143.199.51" dyno= connect= service= status=503 bytes=

any ideas as to how to resolve this?

I have not done it with Heroku before, but may be this can be helpful:

https://coderwall.com/p/gurjmw

I found that this link is an excellent guide (After the fact for me sadly): http://ondrej-kvasnovsky.blogspot.cz/2013/05/how-to-deploy-meteor-on-heroku-with.html

For your question I would use the buildpack they mention above: https://github.com/oortcloud/heroku-buildpack-meteorite

Add it to Heroku:

heroku config:set BUILDPACK_URL=https://github.com/oortcloud/heroku-buildpack-meteorite.git  -a app-nam

and then I found that since I had an existing partial app, it hadn't set the paths correctly for node or main.js, leading to a command not found error.

I DID have to add this section to the Procfile after I tooled around the actual instance:

web: .meteor/heroku_build/bin/node .meteor/heroku_build/app/main.js

and that did the trick.

** Updated **: The original Buildpack mentioned may be a little out of date. The buildpack meteor-buildpack-horse is still getting updates: https://github.com/AdmitHub/meteor-buildpack-horse

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM