-1

I have a project that uses express and react. I'm deploying it to heroku but after running git push, I receive an error in heroku logs. I go to the specified webpage and it says that it cannot find a buildpack. What do I do? Any help will be appreciated!

1
  • Docker containers have been invented to solve this type of deployment issues among other problems. You can build both React app and Express to run inside a container. Then verify the container is running locally. Finally deploy the container to Heroku. It takes 7 commands to do all that, see here for an example. Commented Jan 27, 2021 at 11:23

1 Answer 1

0

you need to go this way: Settings -> Add buildpack -> node.js don't forget, that this is only start and you may need to add some scripts in your package.json file for heroku deployment process

Sign up to request clarification or add additional context in comments.

4 Comments

I have this in the server package.json "heroku-postbuild": "cd client && npm install && npm run build",
Did you add the buildpack in Heroku though? You need to put it in both package.json and in Heroku, as Heroku won't go looking for your script in package.json if it doesn't know what to look for.
i added through dashboard
what do i do now?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.