I need to install a module from a private github repo. In order to do that I'll run npm install git+https://[API-KEY]:x-oauth-basic@github.com/<name>/<repo>.git#<branch>
.
My package.json
file would look something like this:
"dependencies: {
...
"private-repo-name": "git+https://[API-KEY]:x-oauth-basic@github.com/<name>/<repo>.git#<branch>",
...
}
In this case, "private-repo-name"
corresponds to the name
field of the package.json
of the private repo, i.e.:
"name": "private-repo-name"
My question is: How do I change the package name during npm install
without changing the name
field of the private repo?
Note: For public npm modules this wouldn't be a problem due to npm modules not sharing namespaces in the npm registry, but for privately developed modules that arent hosted in npm, there is a potential for the module name to conflict with current or future public npm modules in the npm registry.