Build script returned non-zero exit code: 1

Please follow this:

I found its mostly because you are using old npm/yarn packages
two options to resolve

  1. update the packages
    or if you don’t want to update package version and break something
  2. deploy your locally build folder, so netlify does not get stuck at build stage.
    Build setting to bypass Netlify build process and deploy from github build directory.
Base directory
build

Build command
Not set

Publish directory
Not set

note: don’t gitignore the build directory
Just remember to run “npm run build” before you run git push origin master(or whatever you branch name is)

Hi @inventorDrizzt :wave:t6:, thank you for the feedback! This will help other users who encounter similar issues.

Thanks a lot @millymilly. Your solution worked for me. I installed React copyright with ```
npm install react-copyright-year --save

Thank you so much for posting this! The filename was indeed the issue. As you said, locally it works fine but when deployed, the difference between “r” and “R” in my file name caused the build to fail.

1 Like

ahh case sensitivity happens to the best of us. Glad you got your build working. :tada: