[英]why src and public folders missing in react creat app?
I am trying to create create app using npx create-react-app my-app我正在尝试使用 npx create-react-app my-app 创建创建应用程序
I have npm 6.13我有 npm 6.13
and node : 12.14.1和节点:12.14.1
I tired to follow the soultion in create-react-app doesn't generate public and src folders thus cannot get started我厌倦了遵循create-react-app 中的灵魂不生成 public 和 src 文件夹因此无法开始
but it is not working ?但它不起作用?
Any chance ?任何机会 ?
You might have already installed create-react-app globally.您可能已经全局安装了 create-react-app。 but npx always uses the latest version of create-react-app.但是 npx 总是使用最新版本的 create-react-app。 please check the create-react-app version by请通过以下方式检查 create-react-app 版本
create-react-app -v
and ensure its latest by checking Changelog.md .并通过检查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>
.最初尝试使用但没有成功: 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>
以下命令有效: npx --ignore-existing create-react-app <Your-AppName>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.