npm通过package.json中的依赖项安装私有github存储库

我正在尝试通过npm安装github私有存储库,该库包括其他私有github存储库作为依赖项。


尝试了很多方法和帖子,但是都没有用。这是我在做什么:


npm install git+https://github.com/myusername/mygitrepository.git

在package.json中就像:


"dependencies": {

    "repository1name": "git+https://github.com/myusername/repository1.git",

    "repository2name": "git+https://github.com/myusername/repository2.git"

}

正确的做法是什么?


慕尼黑的夜晚无繁华
浏览 2230回答 3
3回答
打开App,查看更多内容
随时随地看视频慕课网APP