【问题标题】:Cannot Install the forked repo as dependency in the package.json无法将分叉的 repo 安装为 package.json 中的依赖项
【发布时间】:2021-07-24 23:31:42
【问题描述】:

我在将我的分叉存储库安装为依赖项时遇到问题。

从我 fork repository (agney/playground) 开始,然后,我的 fork 存储库将命名为 my-user-name/playground,我想将 fork 存储库作为依赖项安装在另一个项目的 package.json 中。

我尝试了很多方法,但都失败了

  • 将"xxx": "git+https://github.com/my-user-name/playground.git" 添加到package.json。收到错误Can't add "xxx": invalid package version undefined.
  • 在终端中写npm install my-user-name/playground#master得到错误Can't install github:my-user-name/playground#2d9fe8394108c1c63298e109289c72fc3bc56291: Missing package version

请有人告诉我解决此问题的解决方案或方法。提前谢谢你。

【问题讨论】:

    标签: git github npm node-modules


    【解决方案1】:

    已通过向分叉存储库添加版本来修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-02
      • 1970-01-01
      • 1970-01-01
      • 2015-12-21
      • 2022-12-24
      • 1970-01-01
      • 2022-08-11
      相关资源
      最近更新 更多