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:

52 questions
12
votes
3 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
  • 3,363
  • 8
  • 31
  • 58
10
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
  • 600
  • 5
  • 17
8
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
  • 22,419
  • 30
  • 119
  • 232
6
votes
3 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
  • 901
  • 8
  • 22
4
votes
0 answers

VSCode shows wrong npm package info in package.json

When using the intellisense for package.json the information in there is old/incorrect. For example right now it says the latest version for @angular/core is 10.1.3 when in fact it should be 10.2.0: https://www.npmjs.com/package/@angular/core Is…
Mike Jerred
  • 7,082
  • 4
  • 21
  • 33
4
votes
1 answer

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
  • 1,822
  • 1
  • 9
  • 28
4
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,282
  • 13
  • 27
3
votes
1 answer

Use private npm registry for Google App Engine Standard

For all the other stackoverflow questions, it seems like people are asking either about a private npm git repository or about a different technology stack. I'm pretty sure I can use a private npm registry with GAE Flexible, but I was wondering if it…
3
votes
2 answers

npm install package as master project, not as dependency

I am using npm+node for some simple scripting. Minimal example: I have a node project directory (in which I ran npm init), containing script.js, package(-lock)?.json, and node_modules directory with dependencies. And this script I run from cmdline…
3
votes
2 answers

Skip install for particular dep

Is there a way to run npm install but skip a particular dependency? Something like: npm install --skip=lodash --skip=rxjs In my case, I have some developer tooling and some dependencies may not actually be in the NPM registry yet, so I want to skip…
Alexander Mills
  • 1
  • 80
  • 344
  • 642
3
votes
1 answer

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
  • 195
  • 2
  • 3
  • 10
2
votes
0 answers

Attempted import error: 'default' is not exported from '../assertThisInitialized/_index.mjs' - webpack incorrectly imports named imports as default

For some strange reason, Webpack incorrectly attempts to import named imports as default. I noticed the problem when I tried to build my project in a docker container. I got the following error: I also tried building the project directly on my mac…
Innocent
  • 21
  • 3
2
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,024
  • 1
  • 9
  • 14
2
votes
1 answer

Publish angular library in enterprise artifactory

When i have setup npm repository at enterprise JFrog then following 5 npm repositories have been created: npm-local npm-release local npm-generic-local npm-central npm-central-cache And whenever i am trying to publish angular library by using npm…
Anshita Singh
  • 982
  • 1
  • 6
  • 25
2
votes
1 answer

How to pass inline options when running npx?

Without changing the global npm configuration of the workstation or creating an .npmrc file in the current directory, I want to run an npx package using a private nexus registry. So, is it possible to run npx commands (preferably cross-paltform)…
vahdet
  • 4,665
  • 7
  • 33
  • 76
1
2 3 4