-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Could support for other repositories or external private repos (via packages.json) be added to package dependencies? #931
Comments
Typically you'd publish all your private packages under a scope, and you'd tell them to add a registry for that scope to npmrc. |
Thank you - I did not know about scopes. Too bad it requires an extra step. Would be cool if that could be automatically be set-up with a single npm command line call. Otherwise, I can foresee customers even now claiming that they have searched for |
It can; you can craft an npm config command that will do it for them. |
i have a requirement where i need to pull NPM packages from multiple private Repos. In this case both repos where in Gitlab NPM repos owned by different organisations. I raised the issue initially with gitlab here: So I tried to configure the .npmrc like this:
In this case, the Tokens are project level tokens with read repository only permissions. If you need anymore information let me know - happy to help (for the moment I've reverted to downloading and unpacking the tars manually - which is pretty ugly, and no doubt my CTO will come after me at some point and scream 'tech debt' at me and make me watch the phantom menace 10 times with the Darth Maul fight missing). |
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
I have the following scenario:
npm install
when installing other software that includes only some packages from my private repo as dependencies.The general consensus and documentation in this configuration hints to the following solutions:
npmrc
and add my private repo as a source repo but customers would then have to use my repo as a proxy repo (?) to install other packages, never mind that doing so would mean adding the private repo to the user profile which may be unwanted in general,packages.json
support but I do not want to use git for some projects.svn://
URLs such that it would require runningsvnserve
and would thereby add another level of complexity - let alone being, as the name implies, "a crutch",package.json
sounds like a design abstraction aberration or type violation (is the value inpackage.json
supposed to be an URL or a version?).We are going the last option, tarball via CI but there has got to be some other better way. For example, composer [4] for PHP seamlessly seems to support multiple VCS types for dependencies [5,6] so could something similar be added to npm?
Not sure why npm is so exclusively tied to git. SVN aside, how about, say bazaar, mercurial or others maybe? For instance, some of the private repos contain resources (let's say, graphics) that are worked on by third parties such that the complexity of git is not needed albeit distracting.
[1] https://github.com/jtrussell/svn-npm-crutch - Allow node modules to be installed from svn repos.
[2] https://github.com/emolchanov/npm-svn - Allow to install node modules from svn repos.
[3] https://docs.npmjs.com/files/package.json#urls-as-dependencies - You may specify a tarball URL in place of a version range.
[4] https://getcomposer.org/ - composer for PHP
[5] https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md - handling private packages
[6] https://getcomposer.org/doc/05-repositories.md#types - repository types
The text was updated successfully, but these errors were encountered: