最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

Create React App未安装,显示错误并中止安装

IT培训 admin 6浏览 0评论

Create React App未安装,显示错误并中止安装

我重新安装了Node.js和Yarn。现在我收到此错误。

我的环境信息是:

节点:v8.12.0

NPM:6.4.1

纱线:1.10.1

OS:Windows 10

PS C:\Users\mdbel\Desktop\Project\redux> npx create-react-app learnredux

Creating a new React app in C:\Users\mdbel\Desktop\Project\redux\learnredux.

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

yarn add v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "/@xtuc/long/-/long-4.2.1.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\mdbel\\Desktop\\Project\\redux\\learnredux\\yarn-error.log".
info Visit  for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts --cwd C:\Users\mdbel\Desktop\Project\redux\learnredux has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
回答如下:

我遇到了同样的问题,并通过以下方式解决了它:

安装节点,npm和yarn的最新版本。

npm install -g npm@latestnvm install nodenpm install -g yarn

Create React App未安装,显示错误并中止安装

我重新安装了Node.js和Yarn。现在我收到此错误。

我的环境信息是:

节点:v8.12.0

NPM:6.4.1

纱线:1.10.1

OS:Windows 10

PS C:\Users\mdbel\Desktop\Project\redux> npx create-react-app learnredux

Creating a new React app in C:\Users\mdbel\Desktop\Project\redux\learnredux.

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

yarn add v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "/@xtuc/long/-/long-4.2.1.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\mdbel\\Desktop\\Project\\redux\\learnredux\\yarn-error.log".
info Visit  for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts --cwd C:\Users\mdbel\Desktop\Project\redux\learnredux has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.
回答如下:

我遇到了同样的问题,并通过以下方式解决了它:

安装节点,npm和yarn的最新版本。

npm install -g npm@latestnvm install nodenpm install -g yarn

发布评论

评论列表 (0)

  1. 暂无评论