npm ERR! [email protected] build: `CI= react-scripts build`
Asked Answered
C

3

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! [email protected] build: `CI= react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Celibate answered 17/1, 2021 at 11:22 Comment(1)
just run react-scripts buildLimiting
H
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

Houseless answered 29/1, 2021 at 13:14 Comment(0)
B
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.

Bearwood answered 20/2, 2022 at 10:39 Comment(0)
N
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 .

Nihilism answered 24/5, 2023 at 16:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.