react-app-rewired: command not found

See original GitHub issue

I install this package in ‘devDependencies’,

  "devDependencies": {
    "customize-cra": "^1.0.0",
    "react-app-rewired": "^2.1.6",
    "typescript": "^3.7.5"
  }

then config everything as readme.md said, then ‘npm start’,

  "scripts": {
    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-scripts eject"
  },

i got this error:

> react-app-rewired start

sh: react-app-rewired: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
dawnmistcommented, Jul 15, 2020

Did you run npm install after adding react-app-rewired to your dev dependencies?

4reactions
ddenniscommented, Sep 24, 2020

I just had the same issue on windows. Project was using yarn. I deleted node_modules and yarn.lock. Ran npm i - got 'react-app-rewired' is not recognized as an internal or external command Ran npm i react-app-rewired and everything worked again.

Also had to to reinstall node-sass manually, so something properly broke.

Had this in the log.

9 verbose lifecycle playground@0.0.9~start: CWD: C:\***
10 silly lifecycle playground@0.0.9~start: Args: [ '/d /s /c', 'react-app-rewired start' ]
11 silly lifecycle playground@0.0.9~start: Returned: code: 1  signal: null
12 info lifecycle playground@0.0.9~start: Failed to exec start script
13 verbose stack Error:playground@0.0.9 start: `react-app-rewired start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (**\AppData\Roaming\nvm\v12.16.1\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:311:20)
13 verbose stack     at ChildProcess.<anonymous> (C:**\AppData\Roaming\nvm\v12.16.1\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:311:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid playground@0.0.9
15 verbose cwd C:\****playground
16 verbose Windows_NT 6.3.9600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
Read more comments on GitHub >

github_iconTop Results From Across the Web

sh: react-scripts: command not found after running npm start
Enter your project folder and then run npm start . If that doesn't work try running npm install and then npm start ....
Read more >
react-scripts: command not found error [Solved] | bobbyhadz
Run the `npm install react-scripts` command to solve the react-scripts: command not found error. If necessary delete your `node_modules` directory and your ...
Read more >
react-app-rewired - npm
How to rewire your create-react-app project · 1) Install react-app-rewired · 2) Create a config-overrides.js file in the root directory · 3) 'Flip' ......
Read more >
[Solved] react-scripts: command not found - ItsJavaScript
The react-scripts: command not found error mainly occurs if the dependencies are not installed or if the react-scripts is not installed.
Read more >
How to fix the react-scripts command not found Error - Reactgo
How to fix the react-scripts command not found Error · First, delete the node_modules folder in your project (if you have one) using...
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