Search code examples
reactjscreate-react-appnpm-start

create-react-app doesn't generate public and src folders thus cannot get started


i have installed CRA for over a month and have been working with it without having any problems, however today i created a new react app and it builds the folders and directories except it doesn't generate src and public folder(it just generated node-modules folder) thus when i run npm start it gives me an error saying:

npm ERR! missing script: start

enter image description here

enter image description here


Solution

  • Initially you might have installed create-react-app globally.Try to remove using npm uninstall -g create-react-app command and then try npx create-react-app <your-app-name>. The reason is, npx should use it's latest version to work. Hope your doubt is now cleared