Reputation: 75650
I am trying to get jspm working with a private npm registry (which mirrors the public registry).
I used the endpoint config tool to configure jspm from .npmrc appears to work successfully
GAVINJ:jspm-test gavinj$ jspm endpoint config npm
npmrc found, would you like to use these settings? [yes]:
npm registry [http://registry.npm.ourcompanyname.net/]:
Would you like to test these credentials? [yes]:
ok npm authentication is working successfully.
ok Endpoint npm configured successfully.
Installing our package 'michelangelo' (which is not in the public npm registry) works just fine
GAVINJ:jspm-test gavinj$ npm install michelangelo
[email protected] node_modules/highstock-release
[email protected] node_modules/jquery
[email protected] node_modules/d3
[email protected] node_modules/lodash
[email protected] node_modules/michelangelo
Attempting to install the same npm package via jspm does not work.
GAVINJ:jspm-test gavinj$ jspm install michelangelo=npm:michelangelo
Looking up npm:michelangelo
err Repo michelangelo not found!
warn Installation changes not saved.
Attempting to install lodash via jspm works perfectly
GAVINJ:jspm-test gavinj$ jspm install lodash=npm:lodash
Looking up npm:lodash
Updating registry cache...
Looking up github:jspm/nodelibs-process
Looking up npm:process
ok Up to date - lodash as npm:lodash@^3.3.1 (3.3.1)
ok Install tree has no forks.
ok Install complete.
Here's what my jspm config file looks like
{
"registry": "jspm",
"endpoints": {
"github": {
"timeouts": {
"lookups": 60
},
"handler": "jspm-github",
"remote": "https://github.jspm.io"
},
"npm": {
"timeouts": {
"lookups": 60
},
"registry": "http://registry.npm.ourcompanyname.net/",
"remote": "https://npm.jspm.io",
"auth": "PRIVATE_HERE_BUT_SAME_AS_NPMRC_FILE",
"handler": "jspm-npm"
},
"jspm": {
"timeouts": {
"lookups": 60
},
"handler": "jspm-registry",
"remote": "https://registry.jspm.io"
}
}
}
Any idea why I am unable to install the npm pacakge via jspm? Or, any advice on how I could track down the problem?
Upvotes: 2
Views: 1469
Reputation: 75650
It turns out that the registry url cannot end with a /
.
Once I removed the trailing slash it worked like a charm.
Upvotes: 2