(SOLVED) Pushing to Heroku

Technical Support
  • EDIT:
    After setting the heroku remote to the master manually, I managed to push it to Heroku. The app kept crashing when trying to run loader.js, so O set the procfile to instead run app.js directly, and now it boots up. I realize I lose the functionality of restarting through the admin api but it's a trade-off I'm willing to make unless someone has any better ideas. I just wanna use nodeBB for my online game, it just flows and feels nice to use. Thanks!

    I will return to update this if any other complications arise.

    I cannot for the life of me manage to push NodeBB to Heroku...
    I have followed ( https://nodebb.readthedocs.io/en/latest/installing/cloud/heroku.html ) up to step 10 where our setups deviate, where I am using MongoDB instead (I got it set up and working, it connects to the MongoDB database after running the --setup command on NodeBB), NodeBB also manages to run locally.

    However, once I get to committing the Procfile (It's been created and it's in the folder),
    This command: "git rm npm-shrinkwrap.json && git add -f Procfile config.json package.json && git commit -am "adding Procfile and configs for Heroku" " does not work because it tells me npm-shrinkwrapjson doesn't exist, which is fine I guess because it's only trying to remove it? Either way, I try and commit both the Procfile and the package.json but nothing happens, it simply says that everything is up to date (after git push -u heroku v1.0.0:master).

    But looking at my Heroku app, it looks totally blank, nothing has been pushed. Attempting to scale the web dynos with "heroku ps:scale web=1" simply gives me an error saying that the formation couldn't be found which implies the Procfile isn't getting the web loader.js running, so I don't know where it's all going wrong, to be honest.

  • I think I got it pushed to the Heroku app because it did the building process it does with my own app, and I can see nodeBB in the Heroku logs starting up, but it crashes right away now. I am thinking it might have something to do with the MongoDB connection? (It's a Sandbox MongoLabs connection, but it works for my other app and when I run NodeBB locally it makes changes to to the online MongoLab DB as confirmed through their administrative tools)

    These are my Heroku logs:
    2016-06-15T00:00:56.420459+00:00 app[web.1]:
    2016-06-15T02:54:01.203018+00:00 app[web.1]: > [email protected] start /app
    2016-06-15T02:54:01.203024+00:00 app[web.1]: > node loader.js
    2016-06-15T02:54:03.280111+00:00 heroku[web.1]: Process exited with status 0

    I might have done something horribly wrong when building but I am at a loss for what it could be. After cloning the NodeBB from your git, and then trying to push it to my app with a fresh repo clone, it tells me what the srcref for master isn't there when I try "git push heroku master", however if I try what the tutorial says "git push -u heroku v1.x.x:master" it says that it's up to date instead and nothing gets pushed. This is when I tried setting my git heroku branch to master and pushing anyway (it uploaded and the app crash)

    EDIT: I am going to try and do a fresh clone later when I get back from work and create a new Heroku app to attempt this from Step 1, and I will detail my process for you guys so that you have a better understanding of what I might be doing wrong.

Suggested Topics

| | | |