首页 > 解决方案 > 使用 npx create-react-app 创建反应应用失败

问题描述

我正在尝试通过使用命令使用 npx 创建一个 React 应用程序

npx create-react-app my-app

然后我得到了一堆错误,这就是说

error Couldn't find package "@svgr/webpack@4.3.3" required by "react-scripts" on the "npm" registry.
Error: Couldn't find package "@typescript-eslint/eslint-plugin@^2.10.0" required by "react-scripts" on the "npm" registry.
Error: Couldn't find package "@typescript-eslint/parser@^2.10.0" required by "react-scripts" on the "npm" registry.
Error: Couldn't find package "@xtuc/ieee754@^1.2.0" required by "@webassemblyjs/ieee754@1.8.5" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.2" required by "@webassemblyjs/leb128@1.8.5" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.2" required by "@webassemblyjs/wast-printer@1.8.5" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.2" required by "@webassemblyjs/wast-parser@1.8.5" on the "npm" registry.

然后,安装中止,我已经尝试使用'清理 npm 缓存

npm cache clean --force

但它仍然得到同样的错误,有没有解决这个问题的方法?谢谢你!

标签: reactjsnpmcreate-react-app

解决方案


NPM 目前有问题,你可以在这里看到最新的更新:https ://status.npmjs.org/


推荐阅读