DEV Community

Dedar Alam
Dedar Alam

Posted on • Edited on

2 3

React App Deploy Problem in Netlify

Problem 1: Build script returned non-zero exit code: 2


Solution

Example build command before the fix:

npm run build
Enter fullscreen mode Exit fullscreen mode

Example build command after the fix:

CI= npm run build
Enter fullscreen mode Exit fullscreen mode

More

For Next JS

CI= next build
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more