Trouble Getting Starting With React

Hi There!

I’m getting started with react but when I create the new app like in the video (create-react-app react-app) I get the folder with the node modules and the package.json files but not all the other files.

Also when run npm run in the console nothing happens (assuming its because I didn’t get the other files generated therefore missing the script “run”.

I thought this was just an issue with my Mac so i tried on my windows PC but had the same results.

Any ideas would be appreciated!
Thank you!!

Hi A100D-JS,

Thank you for the reply, I greatly appreciate it!

You should also be able to run ‘yarn start’ and you should see the spinning React logo in a new tab in your default browser.

Hi there,

What command did you run to install the create-react-app package ?

thanks

Hi, is this working for you now ?

Thanks for the helpful information.

Thank you Mosh, if you are reading this, for such excellent courses. I love how they get straight to the point and are so short. Your React course looks excellent, but I think could be made extra good if the first few videos were updated. Using the version you provide I ran into trouble immediately: no src folder was created, no public folder created, and had to add script to package.json manually. However, when I used the most recent version of React instead everything went just like in your videos. Perhaps there’s nothing to fear just using the most recent version?

Cheers,
Andrew S


please can you help out, I have tried to fix this error but to no avail, npm start not working

Did you find a solution?

Here are some things you might try:

  1. Making sure you have npm installed. If it isn’t npm start won’t work. To install npm open up terminal in VSCode and type “npm i” (i stands for install).
  2. Check your package.json for the start script. Perhaps the reason npm start won’t work is because you have no start script.
  3. unplug it, plug it back in. Sometimes just restarting your computer, updating everything you can think of can work wonders.

Let me know how it goes

It sounds like there may be an issue with the installation or configuration of your create-react-app setup. Here are some steps you can try to troubleshoot the issue:

  1. Make sure you have the latest version of Node.js installed on your system.
  2. Uninstall any previous versions of create-react-app using npm uninstall -g create-react-app.
  3. Install create-react-app again using npm install -g create-react-app.
  4. Create a new app using npx create-react-app react-app.
  5. Once the app is created, navigate into the directory using cd react-app.
  6. Try running npm start to start the development server.

If you still have issues, it could be related to file permissions or a conflicting package. You can try creating the app in a different directory or checking for any conflicting dependencies. Additionally, you can try running npm cache clean --force to clear the npm cache and then try creating the app again.