After cloning a Git repo with a ReactJS and NodeJS project and install NodeJS
wanted to see the result in the browser and for that had to run in the root folder which had a package.json
npm install
and after
npm start
First command worked fine but the second was giving the following error
> HOST=0.0.0.0 PORT=8000 ./node_modules/.bin/react-scripts start
'HOST' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ...: `HOST=0.0.0.0 PORT=8000 ./node_modules/.bin/react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ... start 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:
The package.json has the following
"scripts": {
"start": "HOST=0.0.0.0 PORT=8000 ./node_modules/.bin/react-scripts start",
Tested using Git Bash, CMD and PowerShell and kept on getting the same error, as you can see in the following images
Git Bash