DEV Community

Cover image for Netlify's Nightmare
Bongani
Bongani

Posted on

1

Netlify's Nightmare

So you have created your react app, and everything works nicely on your localhost / local machine. Then you decide to host it with a service like Netlify,which is an excellent PaaS for static content. All of a sudden your deploy keeps failing 😩. Nightmare right?

Doesn't have to be, firstly check if you have entered all your dotenv values. To do this goto Site Settings > Build & deploy > Environment. You should see environment variables. You will have to rename your variables starting with REACT_APP_ then your variable name, remember to change this on your source code as well. After all this add the variable NODE_VERSION (with the version similar to what you used on your local machine), I was stuck with this issue for days not understanding why I couldn't deploy until I added this.

Hope this was helpful. Please like and share😉.. Happy coding.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay