简体   繁体   中英

why src and public folders missing in react creat app?

I am trying to create create app using npx create-react-app my-app

I have npm 6.13

and node : 12.14.1

I tired to follow the soultion in create-react-app doesn't generate public and src folders thus cannot get started

but it is not working ?

Any chance ?

You might have already installed create-react-app globally. but npx always uses the latest version of create-react-app. please check the create-react-app version by

create-react-app -v

and ensure its latest by checking Changelog.md . if not try uninstalling the global package by

sudo npm uninstall -g create-react-app

make sure you have uninstalled globally and then try running

npx create-react-app <project_name>

initially tried using but not worked: npm rm -g create-react-app , npm install -g create-react-app , npx create-react-app <your-app-name> .

below command works : npx --ignore-existing create-react-app <Your-AppName>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM