yarn
yarn copied to clipboard
Failing to install package that is missing in Yarn Registry but present on NPM
> 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:
NPM:
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 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?
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:
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
Well I just set Yarn to fetch directly form NPM and everything works fine now.
yarn config set registry https://registry.npmjs.org/
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