# Build script returned non-zero exit code 1

**URL:** <https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794>\
**Category:** Support\
**Tags:** deployment, create-react-app\
**Created:** [June 7, 2022, 9:42pm UTC](https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794 "2022-06-07T21:42:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaxaROCK](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/caxarock/32/37987_2.png) [@CaxaROCK](https://answers.netlify.com/u/CaxaROCK)\
**Post date:** [June 7, 2022, 9:42pm UTC](https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794/1 "2022-06-07T21:42:01Z")

</div>

Hello,

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,  
Thanks!

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

> **[Netlify App](https://app.netlify.com/sites/dancing-kitsune-e9a340/deploys/629fc1beafb3ca23fa7f30dc)**
>
> Start building the best web experiences in record time

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [June 7, 2022, 9:44pm UTC](https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794/2 "2022-06-07T21:44:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![CaxaROCK](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/caxarock/32/37987_2.png) [@CaxaROCK](https://answers.netlify.com/u/CaxaROCK)\
**Post date:** [June 7, 2022, 9:49pm UTC](https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794/3 "2022-06-07T21:49:17Z")

</div>

{

```
"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": [

        "react-app",

        "react-app/jest"

    ]

},

"browserslist": {

    "production": [

        ">0.2%",

        "not dead",

        "not op_mini all"

    ],

    "development": [

        "last 1 chrome version",

        "last 1 firefox version",

        "last 1 safari version"

    ]

}

```

}

---

<div class="post-metadata">

**Author:** ![CaxaROCK](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/caxarock/32/37987_2.png) [@CaxaROCK](https://answers.netlify.com/u/CaxaROCK)\
**Post date:** [June 7, 2022, 9:53pm UTC](https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794/4 "2022-06-07T21:53:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![coelmay](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/coelmay/32/24427_2.png) [@coelmay](https://answers.netlify.com/u/coelmay)\
**Post date:** [June 8, 2022, 9:58pm UTC](https://answers.netlify.com/t/build-script-returned-non-zero-exit-code-1/66794/5 "2022-06-08T21:58:37Z")

</div>

Hey @CaxaROCK

I believe [Node v16.15.1 (npm v8.11.0) breaks some builds](https://answers.netlify.com/t/node-v16-15-1-npm-v8-11-0-breaks-some-builds/64367) 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](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript))_

**Example:**

 ![env-var-node-version](https://global.discourse-cdn.com/netlify/original/3X/2/f/2fe1bc614564be7a9892bc695449650228837b0f.png)
