'react-scripts' is not recognized as an internal or external command, operable program or batch file.
See original GitHub issueNote from maintainers: if you came here from search, your issue is likely unrelated to this thread. Just run npm install
before npm start
and you’ll be fine. See the explanation.
Description
I followed instructions when setting up sass but after did the last step I get error in the title
these are scripts in json package
“scripts”: { “build-css”: “node-sass src/ -o src/”, “watch-css”: “npm run build-css && node-sass src/ -o src/ --watch --recursive”, “start-js”: “react-scripts start”, “start”: “npm-run-all -p watch-css start-js”, “build”: “npm run build-css && react-scripts build”, “test”: “react-scripts test --env=jsdom”, “eject”: “react-scripts eject” },
Expected behavior
If it was normal it would start the server and it would compile sass files
Actual behavior
In cli it should run script normally but I get error ‘react-scripts’ is not recognized as an internal or external command, operable program or batch file.’
‘react-scripts’ is not recognized as an internal or external command, operable program or batch file.
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected): `–(empty)node -v
: v7.0.0npm -v
: v3.10.8
Then, specify:
- Operating system: Windows_NT 10.0.14393
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:26 (14 by maintainers)
Could it be that your
node_modules
is corrupted? Can you runnpm install
and try again?If it doesn’t work please post the complete output again.
It is not enough to run
npm start
. You need to runnpm install
to get the dependencies to your machine first. This is not unique to Create React App—it’s just how JS apps generally work in Node/npm ecosystem.package.json
specifies the dependencies but doesn’t actually include the source code for them (sometimes they’re pretty large). So you need to runnpm install
in the project folder after cloning. After that, other commands will work too.