patbied
patbied

Reputation: 53

Npm start doesnt work after I create a react app

I'm following a youtube react tutorial and what I did was npx create-react-app my-app Once this was done I cd'ed into my-app and tried to npm start like the tutorial showed.
I got an error saying -npm ERR! missing script: start
I also saw that the person in the tutorial had a public and a source folder. I only have the node_modules folder and package-lock.json and package.json. Why am I missing the public and source folders and why cant I npm start?

Upvotes: 0

Views: 172

Answers (1)

aaadryyy
aaadryyy

Reputation: 123

I had the same issue and solved it running : npm uninstall -g create-react-app.

Thanks to the -g (aka 'global' attribute) you can run this terminal command no matter the directory you find yourself.

Then go in the directory you would like to find your project and run npx create-react-app my-app again!

Upvotes: 1

Related Questions