react-app-rewired: react-app-rewired: command not found
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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 25 (1 by maintainers)
Did you run
npm install
after adding react-app-rewired to your dev dependencies?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
Rannpm 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.
Was the issue ever solved? I am having this exact issue. And I answer yes to all of those questions above.
If running on a mac, may need to use sudo npm install. Look at the results of that.
@dawnmist You are right. Thanks! Works fine with Windows WSL
@meirkl I have tried checking out that repository and tried running the above commands and everything worked correctly, but as my test machine is linux I am suspicious that the issue may be related to the difference in path handling between linux & windows.
The BrewUNO project mentions that you will need to use
Git Bash if you are under windows
in their readme documentation. Your log error messages appear to indicate that you are running with PowerShell instead. If that is true, can I suggest that you try running with the git bash shell to check that it’s not simply an incompatibility with PowerShell?