1

With lots of issues while installing react.js finally when I thought that issues were resolved and everything is in a good place. I found this as a heartache issue.

Error description Image for reference:

enter image description here

2
  • You used create-react-app to create the app? Commented Jun 3, 2021 at 3:12
  • 2
    Did you install the project dependencies? (npm install) We need a bit more context here. Commented Jun 3, 2021 at 3:15

2 Answers 2

1

Whenever you see this error, it means that something went wrong when you installed the dependencies. The proper method to fix this error and install all the dependencies again can be found in this answer. A quick workaround can be to install this specific dependency again using the following npm command:

npm intall react-scripts start

This will help you solve this issue. I still recommend you to install all the dependencies again so that you won't run into such issues later on.

Please mark this answer as accepted if it solves your issue.

Sign up to request clarification or add additional context in comments.

1 Comment

I think it would be a solution!
0
  1. Please execute the below-mentioned command.

    npx i -g create-react-app

  2. It takes few minutes and displays a message similar to below

    We suggest that you begin by typing:

    cd your-app-name yarn start

    Happy hacking!

  3. cd into the your-app-name folder and execute npm start

Additional Reference: https://reactjs.org/docs/create-a-new-react-app.html

1 Comment

npx isn't used to install packages, it's not a package manager it's a package runner, and it's not recommended to install create-react-app at all, that's why running it directly via npx is the recommended method.

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.