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

Couldn't find package "[PACKAGE_NAME]" on the "npm" registry #7691

Closed
raman-kazhadub opened this issue Nov 16, 2019 · 28 comments
Closed

Couldn't find package "[PACKAGE_NAME]" on the "npm" registry #7691

raman-kazhadub opened this issue Nov 16, 2019 · 28 comments

Comments

@raman-kazhadub
Copy link

raman-kazhadub commented Nov 16, 2019

Please do not close this issue as duplicate - it's not the same as #3645 or #2611 or #6029

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

What is the current behavior?
Sometimes on executing "yarn install" or "yarn add [PACKAGE_NAME]" I get an error message - Couldn't find package "[PACKAGE_NAME]" on the "npm" registry.
[PACKAGE_NAME] is random on each run.
The first time the problem appeared yesterday morning.
I have not changed the package.json or .npmrc, .yarnrc since September.
Logs for "yarn install --registry https://registry.npmjs.org --verbose":
npmjs-registry.log
Logs for "yarn install --registry https://registry.yarnpkg.com --verbose":
yarnpkg-registry.log

If the current behavior is a bug, please provide the steps to reproduce.
package.json of my project:
https://github.com/raman-kazhadub/yarn

What is the expected behavior?
Install all packages with no errors.

Please mention your node.js, yarn and operating system version.
yarn: 1.19.1
node: v10.15.3
OS: Microsoft Windows 10 Enterprise 10.0.17134 Build 17134

@raman-kazhadub
Copy link
Author

raman-kazhadub commented Nov 16, 2019

In the log you could see a line: "Request "https://registry.yarnpkg.com/set-value" finished with status code 404".
But I can get "https://registry.yarnpkg.com/set-value" from browser or by curl

@novli
Copy link

novli commented Nov 16, 2019

Same problem here!
I believe that my local provider is blocking yarn usage for some stupid reason 👎 (закон об устойчивом рунете). Everything works using any VPN service.

@eshimischi
Copy link

eshimischi commented Nov 16, 2019

Same problem here!
I believe that my local provider is blocking yarn usage for some stupid reason 👎 (закон об устойчивом рунете). Everything works using any VPN service.

Вообще не смешно. Not funny at all. Again this demons (Роспотребнадзор) !

@alexmj12
Copy link

yarn install fails with error:

[1/4] Resolving packages...
error Couldn't find package "create-react-class" on the "npm" registry.

but when I get info about "create-react-class" yarn works:

yarn info create-react-class
yarn info v1.19.1
{ name:
'create-react-class',
description:
'Legacy API for creating React components.',

@raman-kazhadub
Copy link
Author

Issue was caused by Russian Federation internet access restrictions.
All works fine with VPN.

@raman-kazhadub
Copy link
Author

Same problem here!
I believe that my local provider is blocking yarn usage for some stupid reason 👎 (закон об устойчивом рунете). Everything works using any VPN service.

Thanks a lot.

@novli
Copy link

novli commented Nov 16, 2019

I'd reopen this to ask someone of contributors about how it is blocked and maybe how to avoid it.
The problem is reproduced during 'Resolving packages' stage.
So if we have yarn.lock file, installation finishes without any problems.

@ERRORthenBSOD
Copy link

yup, got the same problem. My production deploys are based on yarn and now i can't do anything((

@vvershkov
Copy link

Guys, this is definitely not blocking or something like that.

Because:

  1. there is no domain or its IPs in blocklist or something; registry.yarnpkg.com uses cloudflare and they aren't dumb enough to get it banned.
  2. if some blocks involved - you should get connection refused or connection timeout issue, but not HTTP 404 code.
  3. also HTTPS is involved and we are getting 404 with correct SSL certificate. So it is either not blocking issue or RKN just successfully did MITM on most of clients including curl and that is nonsense.

Also everything works just fine with some russian providers. You need to check what is happens on server side.

I am testing this issue by getting verbose from successful run, getting all links from there and test it with curl:

vv@z007-office:~$ cat verbose.txt | grep 'finished with status code' | cut -d'"' -f2 | wc -l
1381
vv@z007-office:~$ cat verbose.txt | grep 'finished with status code' | cut -d'"' -f2 | sort | uniq -c | wc -l
1381
vv@z007-office:~$ cat verbose.txt | grep 'finished with status code' | cut -d'"' -f2 | sort > list.txt
vv@z007-office:~$ head list.txt 
https://registry.yarnpkg.com/abab
https://registry.yarnpkg.com/abbrev
https://registry.yarnpkg.com/accepts
https://registry.yarnpkg.com/acorn
https://registry.yarnpkg.com/acorn-dynamic-import
https://registry.yarnpkg.com/acorn-globals
https://registry.yarnpkg.com/acorn-jsx
https://registry.yarnpkg.com/acorn-walk
https://registry.yarnpkg.com/agent-base
https://registry.yarnpkg.com/ajv


vv@z007-office:~$ for i in `cat list.txt`; do  echo "$i $(curl --head $i 2>/dev/null | grep HTTP)" ; done | grep 404
https://registry.yarnpkg.com/fastparse HTTP/2 404 
https://registry.yarnpkg.com/first-chunk-stream HTTP/2 404 
https://registry.yarnpkg.com/gulplog HTTP/2 404 
https://registry.yarnpkg.com/has-gulplog HTTP/2 404 
https://registry.yarnpkg.com/hoist-non-react-statics HTTP/2 404 
https://registry.yarnpkg.com/is-relative HTTP/2 404 
https://registry.yarnpkg.com/is-resolvable HTTP/2 404 
https://registry.yarnpkg.com/pbkdf2 HTTP/2 404 
https://registry.yarnpkg.com/string.prototype.trimright HTTP/2 404 
https://registry.yarnpkg.com/stylis-rule-sheet HTTP/2 404 
https://registry.yarnpkg.com/tempfile HTTP/2 404 
https://registry.yarnpkg.com/vali-date HTTP/2 404

vv@z007-office:~$ for i in `cat list.txt`; do  echo "$i $(curl --head $i 2>/dev/null | grep HTTP)" & done | grep 404
https://registry.yarnpkg.com/chain-function HTTP/2 404 
https://registry.yarnpkg.com/first-chunk-stream HTTP/2 404 
https://registry.yarnpkg.com/fancy-log HTTP/2 404 
https://registry.yarnpkg.com/is-relative HTTP/2 404 
https://registry.yarnpkg.com/hoist-non-react-statics HTTP/2 404 
https://registry.yarnpkg.com/is-resolvable HTTP/2 404 
https://registry.yarnpkg.com/has-gulplog HTTP/2 404 
https://registry.yarnpkg.com/is-cwebp-readable HTTP/2 404 
https://registry.yarnpkg.com/pbkdf2 HTTP/2 404 
https://registry.yarnpkg.com/postcss-custom-selectors HTTP/2 404 
https://registry.yarnpkg.com/postcss-nesting HTTP/2 404 
https://registry.yarnpkg.com/tempfile HTTP/2 404 
https://registry.yarnpkg.com/string.prototype.trimright HTTP/2 404 
https://registry.yarnpkg.com/url-regex HTTP/2 404 
https://registry.yarnpkg.com/stylis-rule-sheet HTTP/2 404

@victordidenko
Copy link

Maybe some issues with СОРМ? Товарищъ майор не успевает просматривать все запросы

@vvershkov
Copy link

vvershkov commented Nov 20, 2019

Once again - HTTPS is working. You are getting correct server response with correct server sertificate - not broken pipe or some SSL related error.

@victordidenko
Copy link

But СОРМ still mirroring and saving all the traffic nonetheless, I think

@vvershkov
Copy link

vvershkov commented Nov 20, 2019

Yep, but it can't be decrypted and also СОРМ can't send you fake server response protected with encryption. Or it can only after successful MITM attack on every clients in Russia. Like there was some kind of dumb act in Kz where government tried to make everybody install "government" ssl certificate - this certificate was banned by mozilla like 2 days later and week later they said "Ok, this government-powered MITM failed, carry on like there is nothing happened..."

Also there is no issues with several russian providers like IHC.

This issue needs to be investigated on server side.

@AndreyPatseiko
Copy link

Don't have this problem from npm?

@victory-v
Copy link

I have the same problem but it appears quite randomly.
NPM works fine though.

@Evalon
Copy link

Evalon commented Nov 20, 2019

This problem with NPM AWS bucket.
Because 404 you see not 404 from npm register itself, it's from AWS (or maybe with something near it, caching layer etc.).
I wrote to npm support on monday.
They answer me twice with:
Hi,

Please provide the following, so we can investigate.

npm whoami
debug.log file (located in your .npm directory)
screenshots

(first time and after providing logs)

@ERRORthenBSOD
Copy link

Now its working! Thanks everyone

@R1cro
Copy link

R1cro commented Nov 29, 2019

Hey, guys. Seems to be the problems disappeared. Could somebody confirm that, please?

@victordidenko
Copy link

I can confirm from my side, didn't see error happen during this week

@samuelcastro
Copy link

I'm having the same issue, any fixes?

@YazanKhatib
Copy link

I'm having the same issue even when I enable a VPN !?

@JoseFMP
Copy link

JoseFMP commented Aug 6, 2020

Same issue here. Any idea?

@mohzameer
Copy link

Same issue with me now, random packages, doesn't work even with VPN

@fedevitch
Copy link

https://status.npmjs.org/incidents/cksjqc1w11v5 this is some npm registry issue

@YazanKhatib
Copy link

npm registry is fixed now and working perfectly.

@mohzameer
Copy link

Working +1

@ekungurov
Copy link

ekungurov commented Oct 6, 2022

I believe I still run into the same issue.

Given There is HTTPS bump (bloody enterprise huh)
When I install some packages
Then I get error messages "Couldn't find package"..." on the "npm" registry
But I should get error message about something wrong with SSL

Example or error messages:
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
error Couldn't find package "@jupyter-widgets/base@^2.0.0 || ^3.0.0 || ^4.0.0" required by "jupyterlab-plotly@file:../extensions/jupyterlab-plotly-5.10.0.tgz" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "plotly.js@^2.14.0" required by "jupyterlab-plotly@file:../extensions/jupyterlab-plotly-5.10.0.tgz" on the "npm" registry.
at /usr/... .../share/jupyter/lab/staging/yarn.js:38113:17
at Generator.throw ()
at step (/usr/... .../share/jupyter/lab/staging/yarn.js:310:30)
at /usr/... .../share/jupyter/lab/staging/yarn.js:323:13
at processTicksAndRejections (node:internal/process/task_queues:93:5)

@writetonsharma
Copy link

I was also getting this error. We have a local company repo. I was able to set the registry setting for yarn correctly, proxy was working fine too. But still yarn was not able to get anything from the registry. I think yarn was not picking the auth token from npmrc config.
After setting the following I was able to move forward.

_auth to sametoken
always-auth to true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests