score:3

Accepted answer

Answer for people who has same problem.

In my case I changed some of my files name to capitalize version. The problem was Git didn't resolve this change that's why my file structure was wrong on Github. So Solution is changind this config with git.

git config core.ignorecase false this command makes git to be aware of capitalization.

Here is another question on Stacoverflow: I change the capitalization of a directory and Git doesn't seem to pick up on it

score:0

You can go in package.json and in scripts, replace build with:

"build": "CI= npm run build"

You can read more about the causes of this error in their community:

https://answers.netlify.com/t/netlify-not-building-command-failed-with-exit-code-1-npm-run-build/16999/2

score:0

 CI= npm run build 
  • Site setting -> Build & deploy
  • change build command CI= npm run
  • build Redeploy your website

score:0

In netlify,

Under Deploy Setting of the site:
Change Build Command to CI= npm run build

It should be Build command: CI= npm run build

score:0

if you are deploying React app on netlify use the following approach

In Basic build setting:-

  1. Base directory= (empty if inside the repo which you are making live you have direct access to the components)else (the root-directory name)
  2. Build Command = ( CI= npm run build )
  3. Publish Directory = (build) if no root directory or else (root-directory/build)

note- make sure to check the package.json file and inside the "script" you should have build script i.e "build": "react-scripts build",

score:16

Go in package.json and in scripts, replace build with this:

"build": "CI= react-scripts build",

Related Query

More Query from same tag