I found the same error when trying to deploy my single-page React JS web applications to Netlify.
Following is the procedure I followed to solve the issue and successfully deploy the site.
-
Go to Site Settings.
-
Select Build & Deploy dropdown from the menu.
-
Select Continuous Deployment tab from the dropdown.
-
Under the section Build Settings, Select Edit settings.
- Change the build command as
CI= npm run build
- Click Save.
- Change the build command as
-
Then select Environment tab from the dropdown.
- Select Edit variables.
- As the Key enter
CI
and, as the value enterfalse
. - Click Save.
-
Finally retrying the deploying the site again.
This will help you to solve the issue related to hosting ‘Rect JS’ Applications in Netlify & your application will be deployed successfully.