DEV Community

Discussion on: Auto-Deploy a Node.js Server: Heroku + GitHub

Collapse
 
aadilayub profile image
Aadil Ayub

I noticed there's no node_modules in the repo you linked. Do we need to npm install express before pushing the repo to heroku?

Collapse
 
ryhenness profile image
Ryan

Heroku uses the package.json file to npm install the packages itself. Make sure that you have the dependencies section:


"dependencies": {
"express": "^4.16.3"
}

note: be sure this dependencies section includes any packages you are using, or else they will not be installed.