简体   繁体   English

无法使用 npx create-react-app 创建新的反应应用程序

[英]Unable to create new react app with npx create-react-app

I am trying to create new react app with npx create-react-app [name] command.我正在尝试使用npx create-react-app [name]命令创建新的反应应用程序。 But I get following error:但我收到以下错误:

error Couldn't find package "@babel/plugin-transform-flow-strip-types@7.9.0" required by "babel-preset-react-app@^9.1.2" on the "npm" registry.错误在“npm”注册表中找不到“babel-preset-react-app@^9.1.2”所需的 package“@babel/plugin-transform-flow-strip-types@7.9.0”。

Each time it is saying some package could not be found on npm registry (not only @babel/plugin-transform-flow-strip-types@7.9.0 this package).每次它都说在 npm 注册表上找不到一些 package (不仅是@babel/plugin-transform-flow-strip-types@7.9.0 这个包)。

I have also updated my npm and npx , but no success.我还更新了我的npmnpx ,但没有成功。

You can try deleting the .npmrc file located in Users/you/.npmrc and run the command again, seems there is a bug with npm and this is a workaround您可以尝试删除位于Users/you/.npmrc中的.npmrc文件并再次运行该命令,似乎 npm 存在错误,这是一种解决方法

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

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