13

I'm trying to deploy my mean.js app to heroku. Somehow the app on heroku is loading a blank page. It seems like the angular app is not being loaded properly.

Possibly a problem with bower dependencies?

Please take a look at the blank heroku app.

The heroku logs show no errors. No angular errors either.

I would appreciate any help.

eshaham
  • 869
  • 5
  • 12
  • Why was my question down-voted? At least leave a comment so I'll know what I can do better next time... – eshaham Jun 09 '14 at 08:25

3 Answers3

23

OK, I feel stupid.

It took me a while to realize that while my mean.js app is running in production mode, none of the client side javascript got loaded.

It turns out I needed to run grunt build (it's in the mean.js manual).

RTFM :-)

eshaham
  • 869
  • 5
  • 12
  • I'm feeling even more stupid. I have the same problem and I can't resolve it with a grunt build before pushing it to heroku ... could you be more specific ? – Edo Feb 03 '15 at 21:39
  • 5
    It was as simple as that, but here are some tips: Make sure the dist files are not git ignored, check page source to see if they're being referenced, check if there are any javascript errors in the chrome dev tool console. – eshaham Feb 03 '15 at 21:44
  • 3
    BINGO. public/dist was gitignored because one of my teammate use NetBeans and add dist/ to .gitignore and as long as public/dist is build for every change I doesn't care ... Thank you, you save my night – Edo Feb 03 '15 at 22:24
  • Or, alternatively, if you're running gulp like me and just forgot to run gulp build, do that. Made the same mistake 2 years ago first using Heroku (around the time of your question) and posted similar question here. Still needed your question and answer to help me right now. (Ignoring etiquette to say thanks in the comments. This site is lacking in expressions of gratitude in ways that simple counter increments can't account for). Thank you. :-) – bullcitydave Feb 22 '16 at 01:28
3

Go into the App settings from Heroku dashboard.

Go to Config Vars

Change Production to Development.

ChrisM
  • 706
  • 11
  • 30
1

Remember, you have to run npm install as well as bower install

Thomee
  • 59
  • 5