3.03.2.1 React Script Error
react script
is not recognized error
If you installed create-react-app
from Linux, like I did, and then try to run npm start
from Windows (while in the same installation folder), you might get an error:
PowerShell
❯ npm start
> react-complete-guide@0.1.0 start F:\parsh\static\react\react-complete-guide
> react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-complete-guide@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
...
If so, you can help simply dependency reinstall with:
- Bash
- PowerShell
rm -rf node_modules package-lock.json
rm node_modules package-lock.json -r -fo
And then:
npm i
If the Error Persist
danger
You might run into a hidden error: spaces and other unnecessary characters in the file path name.
If you still get the script error
, you may need to replace all spaces
and (
,)
characters with dashes -
in the filenames and parent folders names of your project.