Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An unexpected error occurred: "https://registry.yarnpkg.com/<package>: Not found" #5865

Closed
IlCallo opened this issue May 24, 2018 · 129 comments
Closed
Assignees
Labels

Comments

@IlCallo
Copy link

@IlCallo IlCallo commented May 24, 2018

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
I cannot install some packages globally when in Windows and using Git Bash.
For example, for @nrwl/schematics (but also for @angular/cli) I get

$ yarn global add @nrwl/schematics
yarn global v1.7.0
[1/4] Resolving packages...
error An unexpected error occurred: "https://https://registry.yarnpkg.com/@nrwl/schematics: Not found".

Error log:

  Error: https://registry.yarnpkg.com/@nrwl/schematics: Not found
      at Request.params.callback [as _callback] (C:\Program Files (x86)\Yarn\lib\cli.js:65656:18)
      at Request.self.callback (C:\Program Files (x86)\Yarn\lib\cli.js:134675:22)
      at Request.emit (events.js:159:13)
      at Request.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:135658:10)
      at Request.emit (events.js:159:13)
      at IncomingMessage.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:135578:12)
      at Object.onceWrapper (events.js:254:19)
      at IncomingMessage.emit (events.js:164:20)
      at endReadableNT (_stream_readable.js:1062:12)
      at process._tickCallback (internal/process/next_tick.js:152:19)

In Ubuntu it seems to work just fine.
Same if I use the Windows PowerShell instead of Git Bash.

If the current behavior is a bug, please provide the steps to reproduce.
See above

What is the expected behavior?
That packages are installed

Please mention your node.js, yarn and operating system version.

$ node -v
v9.3.0

$ yarn config list
yarn config v1.7.0
info yarn config
{ 'version-tag-prefix': 'v',
  'version-git-tag': true,
  'version-commit-hooks': true,
  'version-git-sign': false,
  'version-git-message': 'v%s',
  'init-version': '1.0.0',
  'init-license': 'MIT',
  'save-prefix': '^',
  'bin-links': true,
  'ignore-scripts': false,
  'ignore-optional': false,
  registry: 'https://registry.yarnpkg.com',
  'strict-ssl': true,
  'user-agent': 'yarn/1.7.0 npm/? node/v9.3.0 win32 x64',
  lastUpdateCheck: 1527149439512 }
info npm config
{}

Windows 10
@ghost ghost assigned torifat May 24, 2018
@ghost ghost added the triaged label May 24, 2018
@bkad
Copy link

@bkad bkad commented May 31, 2018

Getting the same error message, but maybe a different cause?

$ docker run --rm node:10 yarn global add @types/graphql@0.12.4

yarn global v1.7.0
[1/4] Resolving packages...
(node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.12.4.tgz: Request failed \"404 Not Found\"".
@IlCallo
Copy link
Author

@IlCallo IlCallo commented May 31, 2018

Yeah, seems a different one. Mine seems to be triggered by the usage of Git Bash and its strange behaviour around the "/" character on Windows.

Today I noticed that now it doesn't install any package with a namespace, probably because it converts "/" to backslash for some obscure reasons...

@Jasu
Copy link

@Jasu Jasu commented Jun 4, 2018

This seems to happen randomly - if I run curl repeatedly, the following works around 10% of the time:

curl 'https://registry.yarnpkg.com/@types/node/-/node-9.4.2.tgz'
@chiel
Copy link

@chiel chiel commented Jun 6, 2018

Getting the same issue during our CI build, always fails on the same url @Jasu posted. Indeed it seems to happen randomly so I don't think changing yarn client version or anything will happen. Almost seems like there's a caching layer in place that has cached a 404 on some of its nodes or something.

@sgraham785
Copy link

@sgraham785 sgraham785 commented Jun 6, 2018

Having the same failure as @Jasu is seeing, which just started occurring today. Looks like it could have been cache that allowed it to work 10% of the time, but that seems to have been purged now and I have yet to download it.

seems that the referenced types package at https://registry.npmjs.org/@types/node/-/node-9.4.2.tgz is gone, even though it's still referenced in https://registry. yarnpkg.org/@types/node -> versions.9.4.2.dist.tarball

Anyone on the yarn team aware of why this is removed?

seems that node-9.6.0+ is available, however upgrading to yarn 1.7.0, using node 10 it still tries to pull the node-9.4.3 types tarball has no affect on this and is most likely from a dep (such as in my case)

will try updating the types dep and report back

@sgraham785
Copy link

@sgraham785 sgraham785 commented Jun 6, 2018

yep upgrading my @types/node dep to 9.6.0 worked. not ideal but worked.

i think it's important to mention that this is not a yarn only issue as I found the same issue using npm only and discovered that the @types/9.4.2 & 9.4.3 tarballs missing from the interwebs which could be something to do with removal of those packages by DefinitelyTyped or storage issue on npmjs.org, I wasn't able to find much other info regarding this issue which is why i am adding the context

@anied
Copy link

@anied anied commented Jun 12, 2018

Hey all, heads up-- Had this same issue on mac and was able to resolve this with the following steps:

  • Upgraded to latest yarn version (might not actually be necessary, but wanted to note it was a step I took)
  • remove node_modules
  • remove yarn.lock
  • yarn install

And everything worked/installed as expected.

My hunch is that the salient step is the removal of yarn.lock.

@vinujosef
Copy link

@vinujosef vinujosef commented Jun 13, 2018

@anied I also have the similar issue, but when I remove yarn.lock -> it shows "No lockfile found" and quits the process.

@Ranhiru
Copy link

@Ranhiru Ranhiru commented Jun 20, 2018

After upgrading from Yarn 1.6.0 to 1.7.0 I just deleted the lock file and ran yarn install. Then my yarn add commands started running again without any issue

@peterlavey
Copy link

@peterlavey peterlavey commented Sep 1, 2018

First

npm install

and then...

yarn

@jamsheedpk
Copy link

@jamsheedpk jamsheedpk commented Oct 16, 2018

Arguments:
/usr/local/bin/node /usr/bin/yarn add react-native-modelbox

PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

Yarn version:
1.7.0

Node version:
10.4.1

Platform:
linux x64

Trace:
Error: https://registry.yarnpkg.com/react-native-modelbox: Not found
at Request.params.callback [as _callback] (/usr/lib/node_modules/yarn/lib/cli.js:65656:18)
at Request.self.callback (/usr/lib/node_modules/yarn/lib/cli.js:134675:22)
at Request.emit (events.js:182:13)
at Request. (/usr/lib/node_modules/yarn/lib/cli.js:135658:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/usr/lib/node_modules/yarn/lib/cli.js:135578:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1081:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

@jimklo
Copy link

@jimklo jimklo commented May 2, 2019

Similar issue:

> npx create-react-app --info

Environment Info:

  System:
    OS: macOS 10.14.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Binaries:
    Node: 12.1.0 - /usr/local/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 73.0.3683.103
    Firefox: Not Found
    Safari: 12.1
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found
> npx create-react-app my-app

Creating a new React app in /Users/jklo/projects/jnwc/source/my-app.

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

yarn add v1.15.2
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-9.0.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 "/Users/jklo/projects/jnwc/source/my-app/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/jklo/projects/jnwc/source/my-app has failed.

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

yarn-error.log

Curl can download the package without any problems. Cannot seem to figure out how to even work around this.

edit: I determined the problem... this is certainly terrible error messaging by yarn or npm (not sure if yarn reimplements npm's features or not). Turns out in my instance, I had some bad authentication credentials in my ~/.npmrc, that once removed, allowed scoped packages to download again. I'm still a bit confused by my observation to why this was only a problem for some packages, specifically scoped packages.

@jaapaurelio
Copy link

@jaapaurelio jaapaurelio commented May 10, 2019

Had the same problem. I changed my ~/.npmrc to add always-auth = false. It's working now.

@MartinYounghoonKim
Copy link

@MartinYounghoonKim MartinYounghoonKim commented May 20, 2019

@jaapaurelio
I add it, but doesnt' work. Do u have any solution?

@Stoobaart
Copy link

@Stoobaart Stoobaart commented Jun 5, 2019

Running the below command in terminal fixed my issue:

yarn config set strict-ssl false

@IlCallo
Copy link
Author

@IlCallo IlCallo commented Jun 10, 2019

I don't know what that config option does, but given the name it doesn't seem a good idea to set it to false randomly...
Can you explain why you did it and what is it supposed to do?

@Stoobaart
Copy link

@Stoobaart Stoobaart commented Jun 10, 2019

Hiya, for me it was causing problems due to my strict secure corporate network. It just allowed me to bypass that. I'd just make sure you know what packages you're installing first, and then flip it back to true afterwards. But I'm far from an expert in this, so if anyone has any insights as to any possible dangers here, I'd love to read about them. Cheers everyone.

@vabole
Copy link

@vabole vabole commented Aug 15, 2019

Had this error with sinon:

from packge.json:
"sinon": "^7.0.0",

Error in terminal:
error An unexpected error occurred: "https://registry.yarnpkg.com/sinon/-/sinon-7.4.0.tgz: Request failed \"404 Not Found\"".

I was able to resolve it with:
yarn upgrade --latest sinon

Which made yarn look for sinon-7.4.1.tgz instead.

@gilmoreorless
Copy link

@gilmoreorless gilmoreorless commented Oct 1, 2019

Our builds have been failing intermittently with this same error for the last couple of days. The first failure we noticed was at 2019-09-30T00:01 UTC.

The failures are happening fairly frequently (but not every time, more like 80-90% of the time). It's always the same error, but for 4 different packages so far:

Each of these packages is public, and each version that's failing is the latest one published, so upgrading to a newer version isn't an option. Doing a curl request directly from one of the build machines returns a 200 OK response.

The various suggestions above (and in many other issues) to delete yarn.lock and re-install the modules aren't going to work, because that completely defeats the point of using a lockfile in the first place. Doing so will upgrade every single transitive dependency, instead of actually fixing what is clearly an intermittent problem with the registry itself.

@knoxcard
Copy link

@knoxcard knoxcard commented Oct 2, 2019

root@TRON:/mnt/c/indospace.io/services# yarn upgrade --latest
yarn upgrade v1.19.0
warning package.json: No license field
error No lockfile in this directory. Run `yarn install` to generate one.
info Visit https://yarnpkg.com/en/docs/cli/upgrade for documentation about this command.
root@TRON:/mnt/c/indospace.io/services# yarn install
yarn install v1.19.0
warning package.json: No license field
info No lockfile found.
warning No license field
[1/5] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/binlookup: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/c/indospace.io/services/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
root@TRON:/mnt/c/indospace.io/services#

I concur, the yarn registry is completely screwed up at the moment. Never seen it this bad on my side...keep getting these networks errors. I've deleted yarn lock and tried a ton of solutions that used to work for me in the past....don't know what to do.

@knoxcard
Copy link

@knoxcard knoxcard commented Oct 2, 2019

Problem Solved! Not a yarn problem, but rather a Windows Subsystem for Linux (WSL): connectivity issue.

@RyanPWalker
Copy link

@RyanPWalker RyanPWalker commented Oct 7, 2019

Oddly enough, I just needed to restart my computer. The good ol' turn it off and on again. I tried several different things including the above solutions, but restarting did the trick.

@bobysf12
Copy link

@bobysf12 bobysf12 commented Dec 5, 2019

Problem Solved! Not a yarn problem, but rather a Windows Subsystem for Linux (WSL): connectivity issue.

I'm having the same problem. I'm using WSL too. Could you share how did you solve it? 😄

@lirbank
Copy link

@lirbank lirbank commented Dec 20, 2019

I'm on macOS, and like @RyanPWalker I just rebooted and the error was gone.

@coYms
Copy link

@coYms coYms commented Dec 30, 2019

I just delete the yarn.lock file and try yarn add again, It worked !

@doug31415
Copy link

@doug31415 doug31415 commented Feb 12, 2020

Getting this:

error An unexpected error occurred: "https://registry.yarnpkg.com/7zip-bin: Not found".

deleting yarn.lock and node_modules and then reinstalling hasnt worked, we dont use WSL. Might be related to
https://stackoverflow.com/questions/60185963/error-when-i-run-npm-install-error-404-not-found-7zip-bin4-1-0,
but the post claims the issues there are fixed

This looks like a problem with yarn. Any thoughts?

@kaitlynbrown
Copy link

@kaitlynbrown kaitlynbrown commented Feb 12, 2020

I'm seeing this error now when trying to run builds on CodeBuild:

error An unexpected error occurred: "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz: Request failed \"404 Not Found\"".
@Rabee-AbuBaker
Copy link

@Rabee-AbuBaker Rabee-AbuBaker commented Aug 6, 2020

After breaking the build on production level... it's back working now

@Rabee-AbuBaker
Copy link

@Rabee-AbuBaker Rabee-AbuBaker commented Aug 6, 2020

Another update:

Update - We replaced the faulty cache and our telemetry indicates a significant improvement in error rates. We'll continue to monitor the situation and make sure all issues are fully resolved.
Aug 6, 11:36 UTC

NPM Status

@bipindubey-technoark
Copy link

@bipindubey-technoark bipindubey-technoark commented Aug 6, 2020

Its working now Thanks

@LevanSanadiradze
Copy link

@LevanSanadiradze LevanSanadiradze commented Aug 6, 2020

It worked for me, even though the npm status page still shows partial outage.

@khurram-wasim
Copy link

@khurram-wasim khurram-wasim commented Aug 6, 2020

Screenshot 2020-08-06 at 16 39 44

A sight of relief !
@anthonyminyungi
Copy link

@anthonyminyungi anthonyminyungi commented Aug 6, 2020

Thank you npm :)
스크린샷 2020-08-06 오후 8 40 50

@Rabee-AbuBaker
Copy link

@Rabee-AbuBaker Rabee-AbuBaker commented Aug 6, 2020

image
🎉🎉🎉🎉

@shinjiber
Copy link

@shinjiber shinjiber commented Aug 6, 2020

thank you npm always

@osamaeshtiaq
Copy link

@osamaeshtiaq osamaeshtiaq commented Aug 6, 2020

Working fine now!

@nvtin
Copy link

@nvtin nvtin commented Aug 6, 2020

Working now. Thanks!

@kamranblueeast
Copy link

@kamranblueeast kamranblueeast commented Aug 6, 2020

Working now...:)

@minhhy2801
Copy link

@minhhy2801 minhhy2801 commented Aug 7, 2020

Yarn version: 
  1.22.4

Node version: 
  12.16.2

Platform: 
  win32 x64

Trace: 
  Error: https://registry.npmjs.org/@material-ui%2fcore/i18next: Request "https://registry.npmjs.org/@material-ui%2fcore/i18next" returned a 405
      at Request.params.callback [as _callback] (C:\Program Files (x86)\Yarn\lib\cli.js:66105:18)
      at Request.self.callback (C:\Program Files (x86)\Yarn\lib\cli.js:140748:22)
      at Request.emit (events.js:310:20)
      at Request.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:141720:10)
      at Request.emit (events.js:310:20)
      at IncomingMessage.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:141642:12)
      at Object.onceWrapper (events.js:416:28)
      at IncomingMessage.emit (events.js:322:22)
      at endReadableNT (_stream_readable.js:1187:12)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)

Still happens with me

@wadamomo
Copy link

@wadamomo wadamomo commented Aug 15, 2020

yarn config set registry https://registry.npmjs.org
rm yarn.lock
yarn

worked for me

@Pintot
Copy link

@Pintot Pintot commented Aug 16, 2020

Had the same issue here, and working none of the solutions! My goshi

@Pintot
Copy link

@Pintot Pintot commented Aug 16, 2020

Is not working guys!

$ yarn add react-route-dom
yarn add v1.22.4
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/react-route-dom: Not found".
info If you think this is a bug, please open a bug report with the information provided in "C:\wamp64\www\myapp\y
arn-error.log".

@yael-screenovate
Copy link

@yael-screenovate yael-screenovate commented Aug 23, 2020

same issue by me:(
error An unexpected error occurred: "https://registry.yarnpkg.com/jspfd: Not found".
nothing from above helped.

@GitHubAjit
Copy link

@GitHubAjit GitHubAjit commented Sep 6, 2020

run
yarn config set registry https://registry.npmjs.org
will do the job

@andreapiras
Copy link

@andreapiras andreapiras commented Sep 15, 2020

I was using my phone as hotspot. Restarting the phone fixed the issue 🤷

@pak11273
Copy link

@pak11273 pak11273 commented Sep 22, 2020

run
yarn config set registry https://registry.npmjs.org
will do the job

Doesn't work for me

@mayooresan
Copy link

@mayooresan mayooresan commented Sep 28, 2020

If you are inside an intranet, check which registry you are connecting to. You may have been blocked from the npmjs.org registry.

@fabiosleal
Copy link

@fabiosleal fabiosleal commented Oct 30, 2020

$ yarn global add @nrwl/schematics
yarn global v1.7.0
[1/4] Resolving packages...
error An unexpected error occurred: "https://https://registry.yarnpkg.com/@nrwl/schematics: Not found".

More info:
This error happen not only in macOS, but in Linux (Ubuntu, CentOS) too.

In my case, this error was related to some misfunction in docker, probably after some change on iptables rules.

After restart docker service, everything works fine for me.
$ sudo systemctl restart docker

@Bruce773
Copy link

@Bruce773 Bruce773 commented Nov 23, 2020

run
yarn config set registry https://registry.npmjs.org
will do the job

Worked for me!! 🎉 😁

@alihassan143
Copy link

@alihassan143 alihassan143 commented Jan 16, 2021

yarn global v1.22.5
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.npmjs.org/strapi: error:0909006C:PEM routines:get_name:no start line".
info If you think this is a bug, please open a bug report with the information provided in "C:\Users\aliha\AppData\Local\Yarn\Data\global\info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

@merceyz
Copy link
Member

@merceyz merceyz commented Jan 16, 2021

Closing as there is nothing actionable here, the registry is just a CNAME to npm so need to raise those issues with them
https://yarnpkg.com/getting-started/qa/#why-registryyarnpkgcom-does-facebook-track-us

@merceyz merceyz closed this Jan 16, 2021
@fast-and-curious-1910
Copy link

@fast-and-curious-1910 fast-and-curious-1910 commented Jan 19, 2021

I got the same error.

Error:

PS E:\Coding Projects\BLUEIT\blueit> yarn add -D @types/node typescript nodemon ts-node
yarn add v1.22.5
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "E:\\Coding Projects\\BLUEIT\\blueit\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Node Version: 14.15.2
Yarn Version: 1.22.5
Platform: Windows 10

@dadoadk
Copy link

@dadoadk dadoadk commented Mar 10, 2021

This worked for me:
yarn config set strict-ssl false

@hitfm00
Copy link

@hitfm00 hitfm00 commented May 13, 2021

run
yarn config set registry https://registry.npmjs.org
will do the job

work for me!

@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.