在package.json文件中,我可以成功地引用模块,如下所示:
"[module name]": "git+ssh://git@[host of private repo]:[repo name]/[module name].git"
但是,以下获取对等依赖项的尝试失败:
npm info "git+ssh://git@[host of private repo]:[repo name]/[module name].git" peerDependencies
npm info "https://[host of private repo]/[repo name]/[module name].git" peerDependencies
在这两种情况下,我都收到以下错误:
npm ERR! Invalid package.json
npm ERR! A complete log of this run can be found in:
npm ERR! [PATH]/.npm/_logs/2018-03-06T18_22_24_434Z-debug.log
但是当我为公共模块尝试此操作时,它可以工作:
npm info eslint-config-airbnb peerDependencies
任何帮助将不胜感激!
使用模块名称而不是其 uri 进行查询:
npm info module_name peerDependencies