yarn start
fails with below message
yarn start v0.15.1
$ "react-scripts start"
sh: react-scripts start: command not found
error Command failed with exit code 127.
info Visit http://yarnpkg.com/en/docs/cli/start for documentation about this command.
According to the prompt after creating a project, yarn star
should work.
We suggest that you begin by typing:
cd xyz
yarn start
Happy hacking!
Tell us what actually happens.
node -v
v7.2.0
npm -v
3.10.9
create-react-app --version
create-react-app version: 1.0.0
Operating system: MacOSX 10.12.1
create-react-app
and create one project called xyz
. yarn start
fails, but npm start
works.I can't reproduce with Yarn 0.17.6.
Can you please run yarn self-update
and try again?
Hey @gaearon, I just ran into the same problem. For me, yarn self-update
didn' work (as explained here), but I was able to get past that by using npm -g install yarn
instead, and it worked as expected after that.
After upgrading yarn to 0.17.10, it turns to be working.
worked for me after running just the command yarn
in project folder
It works. Thanks @zverbatim .
For me, accidental npm install --save the package induced the error.
the solution is ..
reset the git
yarn
then yarn add packageName solved the error.
yarn upgrade
I had a similar problem, caused by installing a package using npm instead of yarn, which is what I was using for this project. I got the react script not found error message and the server would not start. To fix it, I ran yarn, then ran yarn start and the server restarted. SUCCESS :)
Well, I know I'm joining the party a bit late... but this was my setup:
So, when I stumbled upon this issue the only thing which helped me was:
brew uninstall yarn
rm $(which yarn)
rm -rf ~/.config/yarn
Then,
brew install yarn
Hope this helps somebody too
having the same issue, yarn self-update
didn't work for me. I ran yarn -v
and it printed my version then updated. I was on 0.24.6. It works now.
yarn upgrade
I experiences the yarn start error on 4 different laptops running Ubuntu and resolved it using these steps.
The underlying issue was that the yarn path was set incorrectly.
If you have this error then you will see a yarn-error.log file in you project directory rather then a normal yarn.log file.
But if you reinstall Yarn on Ubuntu, it will also CORRECT Your React * path to yarn and this error.
Here the steps:
1- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
2- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
3- sudo apt-get update && sudo apt-get install yarn
4- sudo apt-get upgrade
- Then Reboot/Restart your System
-- After you did these STEPS, Go To Your Project and BUILD & START Your Yarn:
1. yarn bulid
2. yarn start
Now, after you created a new 'React' Project, you should see the (( yarn.lock )) file in your project folder!
Then start with:
1. yarn build
2. yarn start
I'm facing the same issue "yarn run v1.12.3" but i still get this error
error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Most helpful comment
worked for me after running just the command
yarn
in project folder