Hello everyone, I leave this topic on the forum so that experienced developers can help me, I am currently in training and I have a final project to submit on a portfolio for an artist, I created the front-end and the back-end with visual studio code,
I work with: JavaScript, CSS, HTML, React, PHP, etc.
I’m trying to upload my project with Heroku but I keep getting front-end and backend errors which mean that my project is not displayed,
Let me show you my github of the project,
If anyone can help me understand the problem that would help me a lot!
Thank you !
Are you getting these errors when developing locally, or only when deploying with heroku?
have you added your env vars to the project config in heroku?
what are the nature of the errors?
I am a beginner in the field, I point out that I do not necessarily understand everything, but when I develop locally in host: I did not get this error, I do not know how to explain but it is like this my back-end was anyway related to my front when I am local, and on heroku, it cannot link the two, when I deploy on heroku I get this error, for example:
“npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@1.0.0 build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.JNa9z/_logs/2024-07-18T17_56_48_204Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! portfolio-artist@1.0.0 heroku-postbuild: NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portfolio-artist@1.0.0 heroku-postbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.JNa9z/_logs/2024-07-18T17_56_48_232Z-debug.log”,
I deleted the node_modules, reinstalled the dependencies several times without success, the same for react,
Thank you for your comeback !
Are the environment variables set in Heroku?
Missing env vars can cause the build process to fail, and it’s easy to forget to add them. This would be my first guess