67
leksyib
6y

Push the node_modules folder to github so heroku won't need to run `npm install`.

Comments
  • 14
    @Droid-on-Fire why not just give your computer to the users? You can't just expect them to have a machine of their own!
  • 2
    @Olverine @Droid-on-Fire 😂
  • 4
    Oh well you might finally help me : how can we manage dependencies for react if people don't push node_modules ?
  • 3
    @Orionss you have a package.json don't you?
  • 3
    @Olverine and ? (I'm newbie to node)
  • 5
    @Orionss whenever you add a dependency, use the --save flag to add the dependency to the package.json file. If you do this, you will just have to push the package.json and whoever clones or pulls from the repository will just have to run 'npm install' to install all the listed dependencies.
  • 4
  • 4
    This basically just happened. My “senior” recommended we just push everything into the repo so we don’t have to worry about running npm install for local dev.....
  • 4
    Won't work if u have native modules and u push from a windows machine and the servers are on Linux (which most of them are) 😉
  • 3
    I'm laughcrying.
  • 2
  • 0
    LGTM
Add Comment