我正在尝试让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
[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
尝试通过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吗?或者,关于如何找到问题的任何建议?
事实证明,注册表URL不能以结尾/
。
一旦我删除了斜杠,它就像一个魅力。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句