I created an app using create-react-app, but can't start it using yarn start or npm run start because I'm getting an error "Couldn't find the binary react-scripts start" or "Failed to exec start script".
npm --version 6.13.4
yarn --version 1.22.0
(Write your answer here if relevant.)
Can't find this issue on recommended sites
Environment Info:
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Binaries:
Node: 12.15.0 - C:\Program Filesnodejsnode.EXE
Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\binyarn.CMD
npm: 6.13.4 - C:\Program Filesnodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
Internet Explorer: 11.0.18362.1
npmPackages:
react: ^16.12.0 => 16.12.0
react-dom: ^16.12.0 => 16.12.0
react-scripts: 3.4.0 => 3.4.0
npmGlobalPackages:
create-react-app: Not Found
(Write your steps here:)
(Write what you thought would happen.)
The app should be started on http://localhost:3000
(Write what happened. Please add screenshots!)
Screenshot with error can be found here:
https://ibb.co/61xkpfy
(Paste the link to an example project and exact instructions to reproduce the issue.)
On Windows, there seems to be a problem with the path. Unless you manually add the repository to your environment path variable, npm start fails.
@savitskiyevgeniy, modify your package.json with the full relative path and see if it works:
"scripts": {
"start": "node node_modules/react-scripts/scripts/start.js"
}
@binarysubstrate , I tried to modify package.json as you recommended but get such error after trying to exec yarn start "Couldn't find the binary node node_modules/react-scripts/scripts/start.js".
So I tried to execute node node_modules/react-scripts/scripts/start.js and it works.
Thanks a lot!
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.