创建未安装React App,显示错误并中止安装 [英] Create React App not installing, showing an error and aborting installation

查看:492
本文介绍了创建未安装React App,显示错误并中止安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I Reinstalled Node.js and Yarn. Now I am getting this error.

我的环境信息是:


节点:v8.12.0

Node: v8.12.0

NPM:6.4.1

NPM: 6.4.1

纱线:1.10.1

OS:Windows 10

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: "https://registry.yarnpkg.com/@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 https://yarnpkg.com/en/docs/cli/add 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.


推荐答案

删除 .npmrc C:\Users\you\.npmrc 的code>也可以解决问题。

removing .npmrc from C:\Users\you\.npmrc can also solve the problem.

这篇关于创建未安装React App,显示错误并中止安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆