matteofigus / npm-stats-www

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

Shut down or just temporary broken? #20

Closed tunnckoCore closed 5 years ago

tunnckoCore commented 5 years ago

Shows: An error occurred while trying to retrieve the results

doowb commented 5 years ago

NPM's skimdb server is down https://npm.community/t/skimdb-is-down-for-me-anyone-else/8060 This is where this site gets the list of packages a maintainer has and some other data about packages.

tunnckoCore commented 5 years ago

So swapping https://github.com/hughsk/npm-stats/blob/master/index.js#L14 with the new registry, will work? Cool. In the thread, they are talking that it will/has support for scoped packages but seems like not? :D

matteofigus commented 5 years ago

Hi friends, unfortunately I don't have a lot of time to fix this. I am going to fix it eventually, but if anyone would like to pick this up earlier with a pull request, I would be happy to help with reviews and deployment

matteofigus commented 5 years ago

As far as I understand, the data source used by npm-stats is not working and that library is not actively maintained anymore. Would need to probably switch to using the API directly for the repo/user metadata

tunnckoCore commented 5 years ago

@matteofigus there is one cool api by @jonschlinkert and @doowb, npm-api (i think? 🤔 )

Or probably the download-stats one.

doowb commented 5 years ago

npm-api uses the same server skimdb.npmjs.com as the npm-stats library in this project. I've tried switching to replicate.npmjs.com as suggested in the linked issue above, however it seems that the couchdb views don't return any data. You can try to see if this project will work by setting the url as an option in npm-stats. I haven't had a chance to try it here yet.

matteofigus commented 5 years ago

Update: the module stats work again, while the author stats are still broken. I'm quite sure that when I checked a couple of days ago they were both broken..

matteofigus commented 5 years ago

Also, just deployed with the new url, and no luck. Module stats keep working, but user stats and latest updated (home page) still broken. Sounds to me that as @doowb stated in their ticket, some views are missing as returning zero results

doowb commented 5 years ago

@matteofigus I updated npm-api to use the new registry and the search api to get the list of projects/repos for a maintainer. Since most of the library relied on the couchdb views, there is still some work to be done, but this will get you to a place where npm-stats-www is working again.

If you just want to use the specific endpoint, you can see the code I updated here.

matteofigus commented 5 years ago

Cool, I updated the maintainer page using npm-api and that fixed the page. I think the home is still using an old view and that still doesn't work, but for the time being most of it is ok so I'm closing. Thanks for your help!

Mouvedia commented 5 years ago

@matteofigus Are you sure it's fixed? Did you check users owning organisations ?

matteofigus commented 5 years ago

This one worked http://npm-stats.com/matteofigus - can you find a broken url? In case, I can try to troubleshoot

Mouvedia commented 5 years ago

@matteofigus http://www.npm-stats.com/ggozlan

Error: Syntax error, unrecognized expression: #ggozlan-@assert/class

tunnckoCore commented 5 years ago

Mine isn't loading too http://npm-stats.com/tunnckocore. It sits at 0/451 for hours.

Uncaught Error: Syntax error, unrecognized expression: #tunnckocore-@hela/cli

Seems like it has something to do with the scoped ones.

Mouvedia commented 5 years ago

Maybe #11 is the culprit.

matteofigus commented 5 years ago

Ok, so there was a frontend issue and I fixed it, so now the page loads and downloads the individual stats. http://www.npm-stats.com/ggozlan

Unfortunately the scoped packages are broken, probably deriving from #11 so that's the thing I'm gonna try tackling next.

matteofigus commented 5 years ago

That's now fixed too @Mouvedia - it was just a little express issue.

tunnckoCore commented 5 years ago

@matteofigus great! : )