Build script returned non-zero exit code 1


I’m new to netlify and trying to deploy an app that I’ve been working on for a while. Although it works just fine on my local server, it keeps giving me the same error every time I’m trying to deploy it. I’ve already tried to add ‘CI=’ as a variable and add it to the Build Command, but it didn’t help.

I’d appreciate any help,

That’s the log I’m getting over and over again

hi there, looks like you are asking for a few different versions of react in different places which is causing problems. could you paste the content of your package.json file please so we can see if that’s where the problem originates?


"name": "client",

"version": "0.1.0",

"private": true,

"proxy": "http://localhost:5000",

"dependencies": {

    "@material-ui/core": "^4.9.10",

    "@material-ui/icons": "^4.9.1",

    "@material-ui/lab": "^4.0.0-alpha.58",

    "@react-oauth/google": "^0.2.1",

    "@testing-library/jest-dom": "^5.16.4",

    "@testing-library/react": "^13.2.0",

    "@testing-library/user-event": "^13.5.0",

    "axios": "^0.19.2",

    "dotenv": "^16.0.1",

    "firebase": "^9.8.1",

    "gapi-script": "^1.2.0",

    "jwt-decode": "^3.1.2",

    "material-ui-chip-input": "^1.1.0",

    "moment": "^2.27.0",

    "react": "^18.1.0",

    "react-dom": "^18.1.0",

    "react-file-base64": "^1.0.3",

    "react-firebase-hooks": "^5.0.3",

    "react-google-login": "^5.1.25",

    "react-redux": "^7.1.3",

    "react-router-dom": "^5.2.0",

    "react-scripts": "5.0.1",

    "redux": "^4.0.5",

    "redux-thunk": "^2.3.0",

    "web-vitals": "^2.1.4"


"scripts": {

    "start": "react-scripts start",

    "build": "react-scripts build",

    "test": "react-scripts test",

    "eject": "react-scripts eject"


"eslintConfig": {

    "extends": [





"browserslist": {

    "production": [


        "not dead",

        "not op_mini all"


    "development": [

        "last 1 chrome version",

        "last 1 firefox version",

        "last 1 safari version"




could it be because of proxy? i think i added it at the early stage of the project

Hey @CaxaROCK

I believe Node v16.15.1 (npm v8.11.0) breaks some builds is possibly relevant in this case. Try by setting the Node.js version to 16.15.0 by setting a NODE_VERSION environment variable in the Netlify UI (see documentation)