2

I am learning React and while implementing my first react app, it shows me this error:

error Command "start" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

when I run:

yarn start

I have installed create-react-app globally on my machine.

I also tried to run npm start but it shows the same error, while searching on internet, I came to know that npm version 5.0 above may not work properly, and that is why I tried yarn start but it still shows the same error.

12
  • Shouldn't it be yarn run start? Commented Jun 4, 2020 at 18:33
  • it is still displaying same error with "yarn run start" Commented Jun 4, 2020 at 18:35
  • 1
    You should NOT install create-react-app globally if you are have node verison 5.2+. See this and docs Commented Jun 4, 2020 at 18:37
  • 1
    @code_ghost To start a new React project, each time you have to do npx create-react-app my-app --use-yarn or "--use-npm". "do i always have to install react": What do you mean? "React" is a UI library, yes it will be automatically get installed locally in each project you start. Commented Jun 4, 2020 at 18:46
  • 1
    @AjeetShah sir, thank you npx create-react-app my-app --use-yarn or "--use-npm" worked. Commented Jun 4, 2020 at 19:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.