command react-scripts build always fails even though react-scripts.cmd exists under folder node_modules/.bin/ strangely: npm run build(build: react-scripts build) will run successfully
2 Answers
You probably not installed react-script globally, therefore it is located in the local node_module.
You can run it with npx
npx react-script build
or provide a path to it...
1 Comment
Liao Pei
Thanks. Installing globally has solved my problem. npx is also useful.The third solution might be: npm bin & react-scripts build.it will run locally
