yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Failing to install package that is missing in Yarn Registry but present on NPM

Open antoniobrandao opened this issue 7 years ago • 6 comments

> yarn
yarn install v1.3.2
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.5.tgz: Request failed \"404 Not Found\"".

But it works with

npm install

Yarn registry:

image

NPM:

image

antoniobrandao avatar Jan 13 '18 18:01 antoniobrandao

Well judging by the screenshot, the latest version is 2.0.4 and yet yarn tries to download 2.0.5 I reckon it's not entirely the problem of registry here.

Nikki1993 avatar Jan 14 '18 08:01 Nikki1993

@Nikki1993 makes it even more interesting to find out why npm install succeeds.

Is there a way to force yarn to fetch code directly from NPM?

antoniobrandao avatar Jan 14 '18 22:01 antoniobrandao

I am not entirely sure but isn't yarn already using npm registry to get modules? It's possible that the author released 2.0.5 and then pulled it resulting in de-sync of yarn mirror to npm.

At least I was/am convinced that's how yarn works :smile:

Nikki1993 avatar Jan 15 '18 08:01 Nikki1993

These could be related because it happened around the same time as this issue. There was a time when some packages went missing and other users of Pinkie experienced the same problem.

  • https://github.com/floatdrop/pinkie/issues/16
  • https://github.com/floatdrop/pinkie/issues/18

meechanism avatar May 23 '18 18:05 meechanism

Well I just set Yarn to fetch directly form NPM and everything works fine now.

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

antoniobrandao avatar Jun 01 '18 15:06 antoniobrandao

Well I just set Yarn to fetch directly form NPM and everything works fine now.

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

This should revert it if necessary: yarn config delete registry

Stan-Stani avatar Feb 22 '24 16:02 Stan-Stani