question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'react-scripts' is not recognized as an internal or external command, operable program or batch file.

See original GitHub issue

Note 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:

  1. npm ls react-scripts (if you haven’t ejected): `–(empty)
  2. node -v: v7.0.0
  3. npm -v: v3.10.8

Then, specify:

  1. Operating system: Windows_NT 10.0.14393

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:26 (14 by maintainers)

github_iconTop GitHub Comments

8reactions
gaearoncommented, Feb 23, 2017

Could it be that your node_modules is corrupted? Can you run npm install and try again?

If it doesn’t work please post the complete output again.

2reactions
gaearoncommented, Apr 15, 2017

On this machine, I cloned the repo and attempted to run npm start.

It is not enough to run npm start. You need to run npm 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 run npm install in the project folder after cloning. After that, other commands will work too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'react-scripts' is not recognized as an internal or external ...
It is an error about react-scripts file missing in your node_modules/ directory at the time of installation. Check your react-script ...
Read more >
'react-scripts' is not recognized as an internal or external ...
To solve the error "react-scripts is not recognized as an internal or external command, operable program or batch file", open your terminal in...
Read more >
Fixing 'react-scripts' is not recognized error - Nathan Sebhastian
'react-scripts' is not recognized as an internal or external command, operable program or batch file. Or just simply: react-scripts: command ...
Read more >
Fix react scripts is not recognized as an internal or ... - YouTube
This video shows, how to fix below issuereact- scripts is not recognized as an internal or external command,commandnpm i -g react - scripts....
Read more >
[Fix] 'react-scripts' is not recognized as an internal or external ...
Step 1: Install “react-script” · Step 2: Execute audit fix command · Step 3: Clean npm cache and update npm · Step 4:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found