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!
-
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.winwiz1– winwiz12021-01-27 11:23:37 +00:00Commented Jan 27, 2021 at 11:23
Add a comment
|
1 Answer
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
4 Comments
EThan
I have this in the server package.json "heroku-postbuild": "cd client && npm install && npm run build",
EThan
i added through dashboard
EThan
what do i do now?