Dedar Alam
Posted on March 1, 2021
Problem 1: Build script returned non-zero exit code: 2
Solution
Example build command before the fix:
npm run build
Example build command after the fix:
CI= npm run build
For Next JS
CI= next build
Problem 2: Netlify does not recognize the URL params when using react-router-dom
Solution
The solution is simple, add a file called _redirects
to your public folder with this content
/* /index.html 200
💖 💪 🙅 🚩
Dedar Alam
Posted on March 1, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.