简体   繁体   English

反应 src 和公共文件夹丢失

[英]React src and public folders missing

I am trying to create a react app.我正在尝试创建一个反应应用程序。 When I run the npx create-react-app myapp command, this is what happens.当我运行npx create-react-app myapp命令时,会发生这种情况。 I know I can ignore the vulnerabilities but the src and public folders are missing in the app folder.我知道我可以忽略这些漏洞,但 app 文件夹中缺少 src 和 public 文件夹。 How can I get the missing folders?我怎样才能得到丢失的文件夹?

follow this steps按照这个步骤

  1. remove create-react-app删除创建反应应用程序
npm uninstall -g create-react-app

2)update npm npx using the following commands. 2) 使用以下命令更新 npm npx。

npm update npx

and run the final step并运行最后一步

npx create-react-app my-app

Run these commands as follow:运行这些命令如下:

npm i -g npm npm i-g npm

npm uninstall -g create-react-app npm 卸载-g create-react-app

npm updates npx npm 更新 npx

npx create-react-app app-name npx create-react-app 应用名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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