繁体   English   中英

使用 npx 创建 React 应用程序时出现错误

[英]i am getting an error when creating a react app using npx

npx create-react-app my-app

错误:我们不再支持全局安装 Create React App。 请使用以下命令之一删除任何全局安装: - npm 卸载 -g create-react-app - yarn global remove create-react-app

我试过了

 npm uninstall -g create-react-app

接着

 npx create-react-app my-app 

但它仍然给我同样的错误 node --version v14.17.6 npm --version 8.1.1

试试这个我有同样的问题并修复它 ny 清理缓存然后运行 npx create-react-app my-app

npm cache clean --force
npx create-react-app myapp

如需进一步指导,请查看此先前的答案

我无法使用 npx create-react-app 安装反应?

您还可以查看官方文档。

https://reactjs.org/docs/create-a-new-react-app.html#create-react-app

暂无
暂无

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

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