流星推到heroku:找不到main.js

问题描述 投票:1回答:2

我在gachuboned.heroku.com上将github.com/ee7klt/tachyoned推送到了heroku并且收到应用程序错误。

我跑的命令是

heroku创建tachyoned --stack cedar --buildpack https://github.com/v8squirrel/heroku-buildpack-meteor.git git remote add heroku [email protected]:taachyoned.git

heroku addons:添加mongohq:​​sandbox heroku config:设置MONGO_URL = mongodb:// [用户名]:[密码] @dharma.mongohq.com:10038 / app123456

git push heroku master

日志如下:

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:[email protected]: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:[email protected]: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:[email protected]: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:[email protected]: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:[email protected]: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:[email protected]: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=

关于如何解决这个问题的任何想法?

node.js heroku meteor
2个回答
1
投票

我以前没有用Heroku做过,但可能会有所帮助:

https://coderwall.com/p/gurjmw


1
投票

我发现这个链接是一个很好的指南(事后对我来说很遗憾):http://ondrej-kvasnovsky.blogspot.cz/2013/05/how-to-deploy-meteor-on-heroku-with.html

对于你的问题,我会使用他们上面提到的buildpack:https://github.com/oortcloud/heroku-buildpack-meteorite

添加到Heroku:

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

然后我发现由于我有一个现有的部分应用程序,它没有为node或main.js正确设置路径,导致找不到命令错误。

在我对实际实例进行操作之后,我必须将此部分添加到Procfile

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

这就是诀窍。

**更新**:提到的原始Buildpack可能有点过时了。 buildpack meteor-buildpack-horse仍在获取更新:https://github.com/AdmitHub/meteor-buildpack-horse

© www.soinside.com 2019 - 2024. All rights reserved.