0

I am learning React, I created react app, i typed cd davidsapp, but when I run npm install i get warnings and errors, and when I input npm start, I get all the errors posted in this link. What can I do?

https://gist.github.com/DavidRNogueira/da37a599c37ad8661c55bf599b7e0751

and here is my package.json:

https://gist.github.com/DavidRNogueira/e9b2cfd67e1d9aa04c0c8af2762d08a2

1 Answers1

0

You may not need to execute npm install if you use the recommended way of creating new React Apps (i.e. using Create React App). As per this document - https://reactjs.org/docs/create-a-new-react-app.html#create-react-app , the command npx create-react-app davidsapp should handle the installation so that you can get started with either yarn start or npm start depending on the option you choose.

  • I have tried without the npm install. But after reading your comment, i tried yarn start, it didnt recognize the command. But then i did 'npm start' and it worked. I have no idea how it got fixed but I have been dealing with this for nearly a week. Thank you haha! – David Nogueira Sep 13 '19 at 23:46
  • Haha! `yarn start` may not work if you do not have `yarn` installed globally. You can achieve it like this `npm i -g yarn` (might require to run with `sudo`) – Mohammad Faisal Sep 14 '19 at 11:12