Questions tagged [npm-registry]

For questions specifically about npm, Inc.’s default public software registry at https://registry.npmjs.org, or any other npm compatible registry.

Reference:

81 questions
25
votes
4 answers

Installing private package from Github Package registry using Yarn fails with not authorized

This question is related to these. But none of the solutions worked for me. Yarn can't find private Github npm registry Installing private package from Github Package registry fails with not found/not authorized I can install a package without…
MLyck
  • 4,959
  • 13
  • 43
  • 74
19
votes
4 answers

How do we verify "npm login" succeeded and the token has not expired?

I've got a script that verifies a user has logged into a private npm registry (via "npm login") by greping for: //registry-sub-url:_authToken= ... in: ~/.npmrc However, this breaks down over time as the user's credentials expire (due to standard…
Ryan
  • 1,171
  • 1
  • 10
  • 23
16
votes
5 answers

Override registry for installed packages in package-lock.json

I have a large, existing package-lock.json and a lot of dependencies that have been resolved via http://registry.npmjs.org/. e.g. { "name": "my-package", "version": "1.2.3", "lockfileVersion": 1, "requires": true, "dependencies": { …
mitchkman
  • 6,201
  • 8
  • 39
  • 67
15
votes
1 answer

npmrc multiple registries for the same scope

Is it possible to contain multiple registries for the same scope? In my company, we use @mycompany scope for both public NPM registry as well as internal registries. I tried to do…
Kousha
  • 32,871
  • 51
  • 172
  • 296
13
votes
3 answers

Get versions from npm registry api

I'm looking for a way to query npm package versions from the npm registry api. All I found until now is that I need to query the whole package metadata and filter the versions from there, Example: https://registry.npmjs.org/react-chuck/ It's ok for…
yershalom
  • 786
  • 1
  • 8
  • 19
8
votes
2 answers

npm install of private package fails when package has public dependencies

Lets say I have a private npm repository, hosted within JFrog artifactory: https://my-domain.com/artifactory/api/npm/my-repo. In this repository I published one npm package: my-package, which builds fine. my-package has a dependency (or more) to…
ysfaran
  • 5,189
  • 3
  • 21
  • 51
7
votes
1 answer

What's the best practice to setup private npm registry authentication for local development and CI?

I wonder if there is a general best practice to set up private npm registry authentication for local development that also works in CI (or vice-versa). Here is my current understanding: For local development: Run npm login which will create an…
Tobi
  • 1,492
  • 1
  • 13
  • 20
7
votes
1 answer

Use auth token to query a private NPM registry for a given package version, but without filesystem access?

The purpose of this effort is to be able to test whether a package version exists in a private registry, without having to touch the filesystem / config files. For packages in public registries this is perfectly straightforward: npm view lpad@2.0.1…
Ian
  • 11,280
  • 3
  • 36
  • 58
6
votes
3 answers

Dependabot with AWS CodeArtifact

I'm trying to use Dependabot with AWS CodeArtifact and I keep getting authentication issues. Dependabot can't authenticate to a private package registry The following private package registry was used and caused the update to fail:…
Cae Vecchi
  • 868
  • 1
  • 10
  • 19
6
votes
3 answers

how to fix connect ENETUNREACH on npm on linux

i am not using a proxy im just a noob trying to learn how to develop with create-react-app locally on my machine(linux) this is the output of tracepath registry.npmjs.org 1?: [LOCALHOST] 0.020ms pmtu 1500 1: …
greg
  • 103
  • 2
  • 7
6
votes
1 answer

NPM: change registry in package-lock.json

For security reason, I need a specific registry, but in the package-lock.json I still keep the https://registry.npmjs.org/ Is there any way to force it?
romuleald
  • 1,406
  • 16
  • 31
5
votes
2 answers

Setting up username and password for npm registry URL

I am trying to use npm to install a package from url : http://host:80 I did the following: npm config set strict-ssl false npm config set registry "<>" npm --proxy http://host:port install <> (our proxy does not require authentication) When I tired…
Jai
  • 295
  • 2
  • 5
  • 11
4
votes
1 answer

What's the difference between `NODE_AUTH_TOKEN` and `NPM_AUTH_TOKEN`?

I'm using some github action to release one of my package in a mono repo, holding about 4-5 package likes: github-repository (monorepo): - folder_1 (package 1) - folder_2 (package 2) - folder_3 (package 3) For each packages located in this…
Paul-Marie
  • 874
  • 1
  • 6
  • 24
4
votes
1 answer

AWS CodeArtifact with multiple private repositories

npm provides a great way of associating a scope with a registry but I don't really see it working with AWS CodeArtifact. I expect that once you created a domain @myco and a couple of repositories under that domain, ex: @myco/repo-a & @myco/repo-b I…
D.Dimitrioglo
  • 3,413
  • 2
  • 21
  • 41
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
1
2 3 4 5 6