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

Private npm config not working right #135

Closed
tauren opened this issue Sep 15, 2014 · 5 comments
Closed

Private npm config not working right #135

tauren opened this issue Sep 15, 2014 · 5 comments

Comments

@tauren
Copy link

tauren commented Sep 15, 2014

I have entered my custom NPM repo URL after issuing this command: jspm endpoint config npm. The URL is the same as the registry in my ~/.npmrc file. The private NPM repo (artifactory) doesn't require authentication to download. My ~/.jspm/config file now looks like this:

{
  "endpoints": {
    "github": {
      "handler": "jspm-github",
      "remote": "https://github.jspm.io",
      "username": "tauren",
      "password": "***hidden***",
      "log": "true"
    },
    "npm": {
      "remote": "https://npm.jspm.io",
      "registry": "http://artifactory.company.com/artifactory/api/npm/npm-repo",
      "handler": "jspm-npm"
    }
  }
}

The private NPM server automatically proxies the public server, so I can install any public or private package from it. However, when I attempt to install a package that works when using npm install lodash, I get an error when using jspm:

:jspm install npm:lodash

     Looking up npm:lodash

err  Invalid status code 503

warn Installation changes not saved

I'd like to start poking around to see what might be wrong, but am not sure where to look. Can you point me to the source files that may pertain?

@guybedford
Copy link
Member

The request that would be giving the 503 in this situation is at https://github.com/jspm/npm/blob/master/npm.js#L84.

This is where it would make a request to - http://artifactory.company.com/artifactory/api/npm/npm-repo/lodash in order to get the package configuration information.

@tauren
Copy link
Author

tauren commented Sep 15, 2014

So I've added logging into npm and it outputs exactly the URL you indicate above. I can successfully hit that URL in both the browser and via curl. Could jspm be adding some sort of headers that cause the request to break?

@tauren
Copy link
Author

tauren commented Sep 15, 2014

So, its our proxy biting me in the ass again. Doesn't look like this is a jspm issue. I really need to spend some time and fix this bug: request/request#620

@tauren tauren closed this as completed Sep 15, 2014
@guybedford
Copy link
Member

Could this be the proxy settings perhaps?

@guybedford
Copy link
Member

Ok sure, do let me know if there is anything we can do this side to make proxy support easier still.

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

2 participants