Npm sounds like a great platform to use within an organization, curious if a private repo is possible, like with Nexus/Maven. Nothing comes up on Google :(
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- Failed at the electron@1.8.2 postinstall script
- How to reimport module with ES6 import
- Webpack getting started, import error
相关文章
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
- Get file created date in node
I don't think there is an easy way to do this.
A look at the npm documentation tells us, that it is possible:
There's also an excellent tutorial on how to create a private npm repository in the clock blog.
EDIT (2017-02-26):
Not really new, but there are now paid plans to host private packages on NPM.
Over the years, NPM has become a factor for many non-Node.js companies, too, through the huge frontend ecosystem that's built upon NPM. If your company is already running Sonatype Nexus for hosting Java projects internally, you can also use it for hosting internal NPM packages.
Other options include JFrog Artifactory and Inedo ProGet, but I haven't used those.
On 14th of April (2015), npm private modules were introduced.
Of course it's not free - currently 7$ a month, per user.
And it's still a pretty new service. For example support for organization accounts is missing (as of June 2015):
So while not perfect, it's the official npm solution to maintaining private packages, and that itself makes it worth mentioning.
UPDATE
Npm Private Packages are now available, with plans for both individual users and organizations:
(disclaimer: not even remotely affiliated in any way with npm, Inc.)
There is an easy to use npm package to do this. https://www.npmjs.org/package/sinopia
In a nutshell, Sinopia is a private/caching npm repository server that you can setup with zero configuration.
Sinopia can be used to :
Repository managers with support for private npm registries:
Forgive me if I don't understand your question well, but here's my answer:
You can create a private npm module and use npm's normal commands to install it. Most node.js users use git as their repository, but you can use whatever repository works for you.
Once your package is made, then use
Verdaccio is what I was looking for and it deserves it's own answer ;) It is an actively maintained fork of Sinopia (highly upvoted answer here). It is a npm registry as a npm package, and can be found here: https://github.com/verdaccio/verdaccio, here: https://www.verdaccio.org, or here:
pnpm i verdaccio
.