使用 npm create-react-app 安装 React 时出现 404 错误

问题描述 投票:0回答:1

我想用这个安装React应用程序

npx create-react-app my-app

但是我收到了这个错误

npm ERR! code E404
npm ERR! 404 Not Found - GET https://repo.huaweicloud.com/repository/npm/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz
npm ERR! 404
npm ERR! 404  'jsx-ast-utils@https://repo.huaweicloud.com/repository/npm/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz' is not in this registry.
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!     C:\Users\henry\AppData\Local\npm-cache\_logs\2023-09-10T06_18_22_392Z-debug-0.log

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

Deleting generated file... package.json
Deleting my-app/ from C:\xampp\htdocs\Practice
Done.

我的node版本是v18.12.1,npm版本是8.19.2

reactjs create-react-app
1个回答
0
投票

由于此软件包在 huaweicloud 注册表中不可用,您可以使用以下命令从主 npmjs 注册表安装它:

npm install jsx-ast-utils --reg https://registry.npmjs.com
© www.soinside.com 2019 - 2024. All rights reserved.