1

I have a basic reactjs app.
I want to deploy it to netlify. To deploy it on netlify, I need to build it first.
But when I run npm run build it throws following error.

My npm version is 6.14.8.

CI= react-scripts build

'CI' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reminder@0.1.0 build: `CI= react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reminder@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Amarjeet\AppData\Roaming\npm-cache\_logs\2021-01-17T11_18_13_129Z-debug.log
Chandan
  • 11,465
  • 1
  • 6
  • 25
Amarjeet
  • 21
  • 1
  • 6

3 Answers3

4

please go and open the package.json please find "build": "CI= react-scripts build" and change it to "build": "react-scripts build", then go and run npm run build again it should be ok

manchit197
  • 41
  • 1
0

Go to the package.json file and do changes in the script object from "build" :"CI= react-scripts build" to "react-scripts build" , then run the command npm run build it will works.

0

Go to the package.json file and change the build: "CI= react-script build" to react-script build and then in terminal run npm run build. Now it'll create a build folder in your file .

OBrien Evance
  • 704
  • 5
  • 18