jspm / registry

The jspm registry and package.json override service
https://jspm.io
229 stars 256 forks source link

Slow/flaky npm.jspm.io registry #1045

Open amasad opened 7 years ago

amasad commented 7 years ago

I've been experimenting with using jspm on Repl.it's JS implementations but as I'm working on it it seems like the registry would randomly hang or rarely throw a 500 error.

I'm using the npm registry by default using the following config:

    System.config({
      paths: {
        '*': 'https://npm.jspm.io/*.js',
      },
    });

Is it just that registry is under too much load? If so is it possible to self-host?

amasad commented 7 years ago

I think I've found at least one of the repro steps:

  1. Requested a scoped npm module
  2. 500 error
  3. Further requests will be very slow and might time out (maybe the server is starting up again)
aluanhaddad commented 7 years ago

Hi, thanks for raising this. I have a question: Are you saying that whenever you request a scoped npm package you receive a 500 error, or just that receiving a 500 error on requesting one is a sufficient repro condition?

it possible to self-host?

You can set up custom registries, for example you might have a private registry within your organization's internal network.

It should certainly be possible to mirror jspm's npm registry by hosting it as a custom registry.

amasad commented 7 years ago

Are you saying that whenever you request a scoped npm package you receive a 500 error, or just that receiving a 500 error on requesting one is a sufficient repro condition?

There's been general flakiness. The scoped module is one consistent repro.

aluanhaddad commented 7 years ago

I am not having any problems running installs for scoped packages. Just tried with a fresh project using various packages within the @angular scope.

Would you be able to share your Repl.it setup? I am not familiar with developing in that environment. Are you using the NodeJS setup as in https://repl.it/languages/nodejs?

amasad commented 7 years ago

It seems to consistently fail on requesting a scoped module. Try: https://npm.jspm.io/@angular/router.js.

I work on Repl.it and I'm adding support for system.js on the JavaScript environment. The setup is that we load Systemjs and then configure it like mentioned in my original post and then pass in any code as a Systemjs module. Then Systemjs does the fetching.

aluanhaddad commented 7 years ago

I can install it via jspm running under NodeJS, with no issues and repeat with success ad infinitum, so the issue seems to be related to running it under Repl.it. That seems like a valid usecase, but can you provide some minimal guidelines as to how we may setup a Repl.it environment for testing? I am just unfamiliar with the platform itself. I will try to take a look at it soon.

amasad commented 7 years ago

Oh ok.

Btw Just clicking on this link would reproduce the 500 error https://npm.jspm.io/@angular/router.js

I'm using it as a module loader basically, I'll try to get a minimal repro out soon. Thanks for looking.