如何在沒有我自己的登錄檔的情況下安裝私有 NPM 模組? - How to install a private NPM module without my own registry?

語言: CN / TW / HK

問題:

I've taken some shared code and put it in an NPM module, one I don't want to upload to the central registry.我已經獲取了一些共享程式碼並將其放入 NPM 模組中,我不想將其上傳到中央登錄檔。 The question is, how do I install it from other projects?問題是,我如何從其他專案安裝它?

The obvious way is probably to set up my own NPM registry, but according to the documentation, that involves a lot of hassle.顯而易見的方法可能是設定我自己的 NPM 登錄檔,但根據文件,這涉及很多麻煩。

Can I just install an NPM module that sits on the local filesystem, or perhaps even from git?我可以只安裝一個位於本地檔案系統上的 NPM 模組,或者甚至可以從 git 安裝?

npm install --from-git [email protected]:project

解決方案:

參考一: https://stackoom.com/question/hZx8
參考二: How to install a private NPM module without my own registry?
「其他文章」