Netlify Keeps Stuck In Loop While Deploying

Viewed 180

I made a React app that is called Mixer that I'm deploying on Netlify

While attempting to deploy, I received an error saying the deploy could not be launched, with the error:

Command failed with exit code 1: npm run build

After a quick google search, I saw several people mention to put in

"build" : "CI= npm run build"

After, I tried deploying again, which led to an infinite loop, where I kept getting the following:

10:32:26 AM: > mixer@0.1.0 build
10:32:26 AM: > npm run build
10:32:27 AM: > mixer@0.1.0 build
10:32:27 AM: > npm run build

This would happen until I cancel the deployment. After googling again, several people mention taking out the CI= npm run build command and replacing it with just npm run build. So I'm confused as to what to do and what the problem may be.

Here's the package.json file I have now:

{
  "name": "mixer",
  "version": "0.1.0",
  "homepage": "https://name.github.io/mixer",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.1",
    "@testing-library/react": "^12.1.2",
    "@testing-library/user-event": "^13.5.0",
    "axios": "^0.25.0",
    "gh-pages": "^3.2.3",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-router-dom": "^6.2.1",
    "react-scripts": "5.0.0",
    "web-vitals": "^2.1.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "npm run 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"
    ]
  }
}
1 Answers

Found out what happened:

When I changed it to the CI= npm run build, and did npm run build, it took that and made it into the build. I deleted the folder and did the build without the CI= part, and now it works fine.

Related