我试图让jspm使用私有的npm注册表(它反映了公共注册表)。
我使用端点配置工具配置来自.npmrc的jspm似乎成功运行
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.
安装我们的软件包'michelangelo'(不在公共npm注册表中)可以正常工作
GAVINJ:jspm-test gavinj$ npm install michelangelo
highstock-release@2.0.4 node_modules/highstock-release
jquery@2.1.3 node_modules/jquery
d3@3.5.5 node_modules/d3
lodash@3.3.1 node_modules/lodash
michelangelo@2.0.1641 node_modules/michelangelo
尝试通过jspm安装相同的npm包不起作用。
GAVINJ:jspm-test gavinj$ jspm install michelangelo=npm:michelangelo
Looking up npm:michelangelo
err Repo michelangelo not found!
warn Installation changes not saved.
尝试通过jspm安装lodash非常有效
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.
这是我的jspm配置文件的样子
{
"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"
}
}
}
知道为什么我无法通过jspm安装npm pacakge吗?或者,关于如何追踪问题的任何建议?
答案 0 :(得分:2)
事实证明,注册表网址不能以/
结尾。
一旦我删除了斜线,它就像一个魅力。