matteofigus / npm-stats-www

A website showing npm modules metrics
http://www.npm-stats.com
111 stars 17 forks source link

npm-stats website is down #15

Closed sterpe closed 7 years ago

sterpe commented 7 years ago

All packages have no data. E.g. http://www.npm-stats.com/sterpe

matteofigus commented 7 years ago

It looks like npm api stopped serving data for packages more than 1 year old. https://api.npmjs.org/downloads/range/2016-01-01:2017-04-10/oc This for instance returns an error

{
error: "exceeded max days of 365"
}
sterpe commented 7 years ago

Whoa, that is weird @isaacs -- why no stats data for packages older than 1 year?

matteofigus commented 7 years ago

Opened an issue here https://github.com/npm/download-counts/issues/31 - I suspect there may be some other underlining issue, as I see no recent code changes and I'm quite sure this used to work smoothly a couple of days ago!

sterpe commented 7 years ago

Subscribed to that issue as well, thanks.

matteofigus commented 7 years ago

So it looks like that is caused by a breaking change of the api - we don't have a unique endpoint for getting all the downloads of a given module, but need to make multiple calls to get 365 days data and then aggregate in another step.

May be something I can try to tackle during the week-end. Apologies for the inconvenience.

OmgImAlexis commented 7 years ago

Maybe get in contact with the people running npm-stat.com they seem to have it working fine.

Ref: https://npm-stat.com/charts.html?package=cz&from=2016-04-13&to=2017-04-13

matteofigus commented 7 years ago

no, the problem is for an interval for more than 365 days. I can reproduce the same issue if I go here (look at chrome network and you see the same problem): https://npm-stat.com/charts.html?package=cz&from=2016-04-12&to=2017-04-13

OmgImAlexis commented 7 years ago

Yes but your site doesn't show anything at all, they at least work with 365 days.

matteofigus commented 7 years ago

It just restarted working. I was actually planning to work on that but I guess npm api change was reverted. Shame there is little transparency on this api changes :(