[英]Can you force npm sub-dependency to install from a GitHub pull request?
我安装geofirestore
需要geofirestore-core
。
geofirestore-core
有一个错误,该错误已在尚未合并的拉取请求中修复。 如何强制我安装的geofirestore
版本在拉取请求中使用geofirestore-core
版本而不是在 NPM 中注册的版本?
遵循此处的答案, 如何覆盖嵌套的 NPM 依赖项版本? ,我采取了以下步骤来使用shrinkwrap :
npm shrinkwrap
geofirestore-core
以指向MarcARoberge/geofirestore-core#feat-firebase8
npm install
;不幸的是,这只是在shrinkwrap 中覆盖了我的更新版本😢我做错了什么?
// npm-shrinkwrap.json
"geofirestore": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/geofirestore/-/geofirestore-4.3.0.tgz",
"integrity": "sha512-NFaOm6BSwAGU+HuYR11St5LgJ67LRYUeeKiF7iPs5/gJgHrpnbFxqe2t3jAW13jpAeoLHnxEoQsPyt94JpZCAw==",
"requires": {
// user/repo#branch point to pull request
"geofirestore-core": "MarcARoberge/geofirestore-core#feat-firebase8"
}
},
我最终克隆了依赖项,更新了它的 package.json 以指向固定的 repo,并将我的本地依赖项指向 GitHub 上的克隆版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.