Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku Deployment Tips and Errors #750

Closed
adle29 opened this issue Aug 21, 2014 · 2 comments
Closed

Heroku Deployment Tips and Errors #750

adle29 opened this issue Aug 21, 2014 · 2 comments

Comments

@adle29
Copy link

adle29 commented Aug 21, 2014

When you try to deploy to heroku, chances are you will get an error about "node-gyp" or other modules.

I was able to solve this by doing this:

  1. First push a fresh copy to your heroku modules, so the modules are installed in the server and not pushed when you do "npm install"; you usually get many errors before you are able to push your project.

  2. If you already started your project add the following to your ".slugignore" file.

          /node_modules/grunt-karma/
          /node_modules/grunt-protractor-runner/
          /node_modules/karma/
          /node_modules/karma-chrome-launcher/
          /node_modules/karma-mocha/
          /node_modules/karma-ng-html2js-preprocessor/
    

There is a problem with Karma, so if the modules are installed in the server at first your will have many errors solved, if not just add this and you will solve most errors.

Other possible solution:
stackoverflow-node-gyp

Issues already referenced here but not solved:
issue #411
issue #108

@MichaelJCole
Copy link

Hi @adle29 , I don't have this problem at all.

I do these things:

  1. mean init which git clones 0.4.0

  2. in /config/env/production.js, comment out the db: line so it uses the MONGOHQ_URL setting in all.js

  3. Set the build pack (see config value below)

  4. Add add-ons.

here is a snapshot of my config vars for reference:

☀ heroku config
=== xxxxxxx Config Vars
BUILDPACK_URL: https://github.com/mbuchetics/heroku-buildpack-nodejs-grunt.git
MANDRILL_APIKEY: xxxxxxxx
MANDRILL_USERNAME: xcxxxxxx@heroku.com
MONGOHQ_URL: mongodb://heroku:xxxxxxxxxxxxxxxxxxxxxxxx
NODE_ENV: production
PAPERTRAIL_API_TOKEN: xxxxxxxxxxxxxxxx

@VikramTiwari
Copy link
Member

Readme has been updated for deployment on Heroku. If need more details, join us on gitter chatroom (https://gitter.im/linnovate/mean)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants