I have basically modified this app
https://github.com/heroku/node-js-getting-started.git
Now am trying to deploy in Heroku
My Procfile has this line
web:node index.js
And when I run this command locally,there are no probs..
However if I try to open the link in my browser after following all the steps in https://blog.risingstack.com/node-hero-deploy-node-js-heroku-docker/
I get an error On checking the logs using heroku logs command I am getting 'node command not found' Anyone knows the prob?
P.S : I tried changing Procfile contents to npm start but that doesnt launch index.js in the browser.
I suspect that you have not set the buildpacks. Buildpacks tells heroku which kind of application is yours.
Use the below command to set the application of type nodejs.
heroku buildpacks:set heroku/nodejs
And make sure that you have a package.json file in the root of the project which is read by heroku to install the project dependencies.
Why don't you try this below in your Procfile.In my case it runs nicely.
web npm install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With