Read the statement by Michael Teeuw here.
Deploying to heroku troubleshooting
-
can you post what you did to setup MagicMirror on heroku? I want to do the same thing, but I’m not 100% sure what I need to change, thanks!
-
I imagine it should work since it’s a node app. I haven’t tried it myself but creating a procfile that runs
node serveronlymay be enough:
https://devcenter.heroku.com/articles/getting-started-with-nodejs#define-a-procfile -
Oh actually read to the end of your post :) Looks like the music module runs the player on the server side (on the heroku dyno) which is what’s likely failing. You can run
heroku logs -a <your appname>to see any error messages. -
@dmcinnes yeah that’s what I thought but I’m having issues with that, it seems to fail at:
016-08-09T00:38:56.941069+00:00 app[web.1]: Ready to go! Please point your browser to: http://localhost:8080
2016-08-09T00:39:37.042725+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-08-09T00:39:37.042725+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-08-09T00:39:37.194692+00:00 heroku[web.1]: Process exited with status 137 -
@gndimitro Ah! Heroku needs to tell your app which port to run on. An update to config.js to take the environment’s
PORTvalue into account may do the trick:port: process.env.PORT || 8080, -
@dmcinnes Thanks! That worked, now I have different issues but it’s live on heroku now. :)
-
@dmcinnes Actually it’s giving me an odd error in the dev console, it’s saying “process is not defined” and then that breaks my config file so the app is running but not working correctly, do you have any ideas?
-
@dmcinnes I changed my port value to
port: process.env.PORT, just for heroku. -
@dmcinnes So I found a solution! I changed a line in server.js to
server.listen(process.env.PORT || config.port);and that seemed to work, it didn’t break my config file -
@gndimitro awesome!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login