DEV Community

Discussion on: How to deploy a Webapp to Heroku (Node.js, React.js and MongoDB)

Collapse
 
xporium profile image
xporium

Hi,
Nice article. but after added "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client" i cant deploy code on heroku it is giving me error like "failed to push some refs to my application"
and if i remove this line then its deploy successful but at that time site not working. So can you tell me why is this happening?

Thanks,
Dilip

Collapse
 
pacheco profile image
Thiago Pacheco

Hi Dilip,

This error usually happens when there are some conflicts while pushing to heroku, I am not sure if that is because of the environment variable.

Could you tell me what do you get in your logs on Heroku?

You can retrieve the logs going to the root of your project and using the following command:

heroku logs --tail