Skip to content

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

Closed
rnmapbox/maps
#609
@IlCallo

Description

@IlCallo

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

Activity

ghost assigned on May 24, 2018
bkad

bkad commented on May 31, 2018

@bkad

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

IlCallo commented on May 31, 2018

@IlCallo
Author

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

Jasu commented on Jun 4, 2018

@Jasu

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

chiel commented on Jun 6, 2018

@chiel

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

sgraham785 commented on Jun 6, 2018

@sgraham785

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

sgraham785 commented on Jun 6, 2018

@sgraham785

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

anied commented on Jun 12, 2018

@anied

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

vinujosef commented on Jun 13, 2018

@vinujosef

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

Ranhiru

Ranhiru commented on Jun 20, 2018

@Ranhiru

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

peterlavey commented on Sep 1, 2018

@peterlavey

First

npm install

and then...

yarn

jamsheedpk

jamsheedpk commented on Oct 16, 2018

@jamsheedpk

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

jimklo commented on May 2, 2019

@jimklo

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

jaapaurelio commented on May 10, 2019

@jaapaurelio

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

120 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @mayooresan@chiel@gilmoreorless@torifat@Vadi

    Issue actions

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