-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error on some names #9
Comments
The error is coming from https://github.com/sholladay/squatter // @sholladay |
Thanks, I am able to reproduce this. Seems to be due to changes to the npm registry. Specifically, the call we make at has-binary-or-dependent.js#L16-L28 is now failing for all packages. The reason you only see it for some packages in the CLI is because we short-circuit the logic and don't run that code if we don't need it, which is the case for some packages. I ran the The error output from the HTTPError (GotError) {
headers: {
'accept-ranges': 'bytes',
age: '0',
'cache-control': 'max-age=0',
connection: 'close',
date: 'Wed, 23 May 2018 16:01:32 GMT',
'npm-notice': 'this endpoint is deprecated',
'transfer-encoding': 'chunked',
via: '1.1 varnish',
'x-cache': 'MISS',
'x-cache-hits': '0',
'x-served-by': 'cache-bos8228-BOS',
'x-timer': 'S1527091292.376027,VS0,VE366',
},
host: 'registry.npmjs.org',
hostname: 'registry.npmjs.org',
method: 'GET',
path: '/-/_view/dependedUpon?group_level=2&startkey=%5B%22rawr%22%5D&endkey=%5B%22rawr%22%2C%7B%7D%5D&stale=update_after&skip=0&limit=1000',
protocol: 'https:',
statusCode: 404,
statusMessage: 'Not Found',
url: 'https://registry.npmjs.org/-/_view/dependedUpon?group_level=2&startkey=%5B%22rawr%22%5D&endkey=%5B%22rawr%22%2C%7B%7D%5D&stale=update_after&skip=0&limit=1000',
message: 'Response code 404 (Not Found)',
} The thing that catches my eye is that
I guess this is a hard deprecation. 😞 Anyone know if there is a replacement? I filed https://github.com/npm/registry/issues/231 back when I first released |
The all-the-package-names package is updated daily by a bot. It's not up-to-the-minute accurate, but will be adequate for most cases:
|
I need something that, given a package name, returns a list of dependents (or at least the number of dependents).
|
Yeah Registry folks you may want to reach out to: |
I reached out to Benjamin Coe on Twitter and he replied that the endpoint being used here has not knowingly been deprecated. So this is likely just a regression on the registry that will (hopefully) be fixed soon. I'll give them some time to fix it and in the meantime, I'll think about ideas for offline fallbacks to improve the UX going forward. |
My new package check-npm-dependents can help you with number of dependents. Not offline but always up to date. It takes data right from npmjs.com pages. |
Neat idea! Seems like a reasonable workaround for now. I'll open a couple of issues with improvement ideas and look into including it in a patch release. |
good idea, @astur. Is anyone else sad that it's 2018, npm Inc has been a funded company for 5 years, and there's still no API for this kind of thing? Seems ridiculous that we have to scrape the website for this info. |
Ok, fixed version on npm now. |
@sholladay Can you use that package and release a new version of |
I have fixed this in I opened a PR with the upgrade: #13 Unrelated side note: |
@sholladay No problem, I can change |
Also, in case anyone wonders why we were using a CouchDB view in the first place, it was officially supported...
😞 |
@sholladay Now |
HTTPError throws when checking some package names via this cli-package. Like this:
f is real npm package.
When using API from npm-name it will be all right for this package:
I thing it is a bug.
The text was updated successfully, but these errors were encountered: