Questions tagged [npm-private-modules]

For questions about creating, publishing, and consuming "private" NPM modules/packages.

packages (i.e. modules) can be created and published privately. Private modules enable you to share your code with a limited set of collaborators (users or teams).

private modules are defined with a @scope/ prefix to the package name (i.e. @scope/project-name). The @scope part acts as a for the package and is typically either; a npm username, or org name. For instance: @myusername/project-name and @mycompany/project-name respectively.

assumes @scope/ packages to be private when published, however @ scoped packages can also be published publicly too. Similarly to public packages, the standard tool is utilized to publish and consume private modules.

Publishing private user-scoped or org-scoped module(s) to the is a paid for service which you have to sign-up for.

References:

15 questions
384
votes
16 answers

How to install a private NPM module without my own registry?

I've taken some shared code and put it in an NPM module, one I don't want to upload to the central registry. 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…
futlib
  • 8,258
  • 13
  • 40
  • 55
35
votes
1 answer

Globally configure NPM with a token registry to a specific scope (@organisation)

I want to globally setup an NPM registry for a specific scope to be used with a specific token. I know that I can use : $ npm login --scope=@organisation And I can also write a ~/.npmrc with : //registry.npmjs.org/:_authToken=XXXX But what I want…
Yves M.
  • 29,855
  • 23
  • 108
  • 144
27
votes
2 answers

Define private registry in package.json

We have a private npm repository based on Sinopia What should I define in package.json that some packages will be installed from Synopia rather then from global npm repository? If I install it from command line I can run: npm install…
Anatoly
  • 5,056
  • 9
  • 62
  • 136
25
votes
7 answers

docker build + private NPM (+ private docker hub)

I have an application which runs in a Docker container. It requires some private modules from the company's private NPM registry (Sinopia), and accessing these requires user authentication. The Dockerfile is FROM iojs:latest. I have tried: 1)…
GTF
  • 8,031
  • 5
  • 36
  • 59
4
votes
2 answers

Authenticate npm private registry in docker

We're publishing scoped js packages to a private registry (managed by us using Verdaccio). It means that in our production environment, we need to authenticate to our private registry to use yarn install. What's the easiest way to do it ?
mbesson
  • 629
  • 5
  • 24
2
votes
3 answers

Installing a private package from Gitlab with Yarn

I have a private npm package that is published to the Gitlab Package Registry using a Gitlab CI pipeline. I want to install this package in a project using yarn. Following the documentation helped me come up with the following .npmrc file…
uiguig
  • 61
  • 7
1
vote
0 answers

Unable to resolve dependency for npm private module in node js

I have created a private module in node and published it to the nexus repository. The private module is using 'cryptr' module for encryption. When I install the private module to my application and try to access methods inside it, getting an…
1
vote
1 answer

Installing private NPM module over GIT, and having it update?

I looked at this answer, which shows you how to install npm modules from private git (sub)folders. This works correctly for me when I do: npm install git+ssh://git@github.com:myaccount/myprivate.git, my main application can then call the code in…
Mike K.
  • 543
  • 3
  • 14
  • 46
1
vote
2 answers

Unable to install sub npm dependencies for a pvt npm module

I have an npm private repo through sinopia I have published an app in this. It is a full end-to-end application using Angular2 on the UI side. It has its own dependencies mentioned in package.json such as @angular/core, animations etc. When I…
arjun
  • 11
  • 5
1
vote
1 answer

npm private modules error

I've couple of private modules that are not on the npm site and I'd like to use them in my application but running in couple of issues while uploading at Elasticbeanstalk. (Elastic beanstalk runs it's npm install after each upload). The AWS…
user2727195
  • 7,122
  • 17
  • 70
  • 118
0
votes
0 answers

ReactJS: npm package installation priority with private and public registry

If I have a private npm package where I have maintained the registry scoped to my @org/package in my application .npmrc file and if someone else registers the same package name publicly on npm as in the package.json i.e. @org/package as it was…
Aryan M
  • 571
  • 3
  • 12
  • 33
0
votes
0 answers

Building React application using Azure DevOps, package-lock.json and private npm registries

We have a React application that builds via npm on Azure DevOps. For the time being I've excluded our package-lock.json from our repository because a few of the packages we use come from private npm registries and this installs and builds fine.…
user1015196
  • 617
  • 1
  • 7
  • 24
0
votes
1 answer

Use git repository as private NPM registry

Want to use git repository as a private npm registry to publish my own npm packages. I have tried with the publishConfig and npm config set registry <>. When I am setting the npm registry with npm config set registry <> and try to login with npm…
0
votes
1 answer

NPM Private Modules: How can I install my private modules on a AWS Beanstalk instance?

NPM Private Modules look great, but I'm not sure how to install them on an AWS Beanstalk instance. Is there any literature published on this? Also, on the default Node.js configuration Beanstalk uses npm version 2.7.4. Will this be a problem?
ac360
  • 7,735
  • 13
  • 52
  • 91
-1
votes
1 answer

Is it a good idea to use NPM to upload some packages of a commercial project on it?

I am following a Microservices course that creates a free NMP account and pushes a package he writes through the course into it and imports this package in other related files of the application like a common NPM module/package. He also mentions…
GoodMan
  • 542
  • 6
  • 19