【问题标题】:Can you force npm sub-dependency to install from a GitHub pull request?您可以强制从 GitHub 拉取请求安装 npm 子依赖项吗?
【发布时间】:2021-03-03 12:11:58
【问题描述】:

我正在安装geofirestore,它需要geofirestore-core

geofirestore-core has a bug 那是 fixed in a pull request 尚未合并。如何强制我安装的geofirestore 版本在拉取请求中使用geofirestore-core 版本,而不是在NPM 中注册的版本?

按照这里的答案How do I override nested NPM dependency versions?,我采取了以下步骤来使用shrinkwrap

  1. npm shrinkwrap
  2. geofirestore-core 更新为指向MarcARoberge/geofirestore-core#feat-firebase8
  3. 又跑npm install

不幸的是,这只是覆盖了我在收缩包装中的更新版本????我做错了什么?

// 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"
   }
},

【问题讨论】:

    标签: javascript node.js npm geofirestore


    【解决方案1】:

    我最终克隆了依赖项,更新了它的 package.json 以指向固定的 repo,并将我的本地依赖项指向 GitHub 上的克隆版本。

    【讨论】:

      猜你喜欢
      • 2016-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-07
      • 2016-01-24
      • 1970-01-01
      • 2018-05-27
      • 2016-08-02
      相关资源
      最近更新 更多