【问题标题】:Error while creating new react application with npx create-react-app my-app使用 npx create-react-app my-app 创建新的反应应用程序时出错
【发布时间】:2021-11-27 19:05:02
【问题描述】:

我尝试使用命令创建一个新的 react 应用程序

npx create-react-app my-app

加载需要一些时间,但在安装软件包时出现以下错误:

npx: installed 67 in 3.337s

Creating a new React app in /home/Github/my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@svgr%2fbabel-preset - Not found
npm ERR! 404 
npm ERR! 404  '@svgr/babel-preset@^5.5.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of '@svgr/plugin-jsx'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/.npm/_logs/2021-10-07T17_20_12_439Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting my-app/ from /home/Github/Amazon-Clone
Done.

github上有一些讨论,但对我来说效果不佳。 我已经重试了很多次,也尝试在新文件夹中创建它。

【问题讨论】:

标签: node.js reactjs react-native npm


【解决方案1】:

npmjs 可能服务中断。你可以从他们的官方网站查看 npm 的状态。 这是链接:https://status.npmjs.org/

【讨论】:

  • 是的,当我最初尝试时它说“服务中断”,但后来它工作的状态是“所有系统运行”。谢谢你的回答。
猜你喜欢
  • 2022-10-20
  • 1970-01-01
  • 2021-03-27
  • 2020-09-16
  • 2022-01-25
  • 1970-01-01
  • 1970-01-01
  • 2020-08-11
  • 1970-01-01
相关资源
最近更新 更多