Create-react-app: Yarn start gives such message "error Couldn't find the binary react-scripts start"

Created on 17 Feb 2020  路  4Comments  路  Source: facebook/create-react-app

Describe the bug

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".

Did you try recovering your dependencies?

npm --version 6.13.4
yarn --version 1.22.0

Which terms did you search for in User Guide?

(Write your answer here if relevant.)

Can't find this issue on recommended sites

Environment

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

Steps to reproduce

(Write your steps here:)

  1. Create new app using create-react-app
  2. exec command: yarn
  3. exec command: yarn start

Expected behavior

(Write what you thought would happen.)

The app should be started on http://localhost:3000

Actual behavior

(Write what happened. Please add screenshots!)

Screenshot with error can be found here:
https://ibb.co/61xkpfy

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

bug report needs triage stale

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jnachtigall picture jnachtigall  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

JimmyLv picture JimmyLv  路  3Comments