首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >出现意外错误:"https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz:请求失败\"404未找到\“

出现意外错误:"https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz:请求失败\"404未找到\“
EN

Stack Overflow用户
提问于 2020-02-13 09:33:25
回答 3查看 9.1K关注 0票数 5

当我尝试使用create- react -app创建一个新的react应用程序时,我得到了以下信息:

代码语言:javascript
复制
» npx create-react-app my-order

Creating a new React app in /Users/ian/myproject/my-order.

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

yarn add v1.19.0
[1/4]   Resolving packages...
[2/4]   Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/ian/myproject/my-order/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 /Users/ian/myproject/my-order has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.

我的本地环境信息是这样的:

代码语言:javascript
复制
» npx create-react-app --info

Environment Info:

  System:
    OS: macOS 10.14.6
    CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 11.1.0 - /usr/local/bin/node
    Yarn: 1.19.0 - ~/.yarn/bin/yarn
    npm: 6.7.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 80.0.3987.100
    Firefox: 72.0.2
    Safari: 12.1.2
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: 2.1.1

有人知道这是怎么回事吗?

EN

回答 3

Stack Overflow用户

发布于 2020-05-27 18:49:38

在你的命令中试试这个:- yarn缓存clean - yarn,它可能会起作用...

票数 2
EN

Stack Overflow用户

发布于 2020-08-06 19:03:22

有时,访问npmjs.com和安装限定作用域的包时会出现问题。尝试检查https://status.npmjs.org/

票数 2
EN

Stack Overflow用户

发布于 2021-12-08 14:55:17

如果您使用NVM,那么当您从最初安装主要nodejs版本切换到其他版本时,可能会出现这个问题,所以如果可以的话,就改回原来的版本:nvm use <original node installation's version>

但是,如果这对你不起作用,那么如果我不能使用非NVM安装,那么我会尝试直接从网站重新安装node:https://nodejs.org/en/

对于一些人来说,他们似乎有一个电子访问错误,这可以通过将他们的注册表从http改为https:npm install --registry=https://registry.npmjs.org/来修复

一个类似的问题:Cannot run npm install from nvm, but working well using source from https://nodejs.org/en/download/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60199252

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档