Questions tagged [.npmrc]
65 questions
19
votes
4 answers
vsts-npm-auth exists with code 1, the input is not a valid Base-64 string
I have configured my project to use private Azure DevOps feed through .npmrc file.
I have a .js script that does the following:
const { exec } = require('child_process');
const npmrc_location = ...
const commands =
[
…

Kari
- 201
- 2
- 5
16
votes
2 answers
How can I see which .npmrc file is being currently used
I am having issues with npm & the packages I have installed with npm. When I install the package "@date-io/core" — using the npm package manager — everything works as expected, however; when I install the same package using yarn as the package…

Jamie Hutber
- 26,790
- 46
- 179
- 291
15
votes
2 answers
How to npm login as a different user per scope on same registry?
I need to set up multiple npm authTokens that are for two different scopes, but both scopes are on the same…

fragile_frogs
- 371
- 2
- 8
5
votes
2 answers
How to run AWS codeartifact login and keep default registry
I run this commande in a package.json file (scripts > preinstall) or (scripts > prepare):
aws codeartifact login --tool npm --repository my-repo --domain my-domain --domain-owner <123456789> --profile
full file: (<123456789> and is…

Stéphane GRILLON
- 11,140
- 10
- 85
- 154
4
votes
2 answers
Unable to set correct npm config for group registry
I have two npm packages that are private repositories hosted on gitlab.com under a group organization.
My first package lives well and get updated and downloaded by users of the same organisation.
To install a private scoped package, the doc says:
#…

Existe Deja
- 1,227
- 3
- 14
- 36
4
votes
1 answer
Configure global nprmrc file location in Windows
In Windows, I want to change the default global npmrc location, how can I do this?

MightGod
- 436
- 2
- 8
- 19
3
votes
0 answers
Loading npm registry ca certs from environment to npmrc
In order to use private npm registry I am trying to setup credentials and ca certs in project's .npmrc file .
like following:
ca[]= # NOTE this needs to string in double quotes, with newlines replaced be \n
ca[]= # NOTE…

Rahul Bhooteshwar
- 1,675
- 17
- 31
3
votes
1 answer
Adding .npmrc file to Angular project
I seem to be missing a whole step in doing this. I added an .npmrc file in the root of my angular project and added the following line inside it:
@example/xxx:registry=ssh/url/of/my/private/repo/in/bitbucket
And accordingly added @example/xxx in my…

ilpianoforte
- 1,180
- 1
- 10
- 28
3
votes
1 answer
Pulling private npm repository to docker container through kubernetes/skaffold
I am new to skaffold, k8s, docker set and I've been having trouble building my application on a cluster locally.
I have a code repository that is trying to pull a private NPM package but when building it loses the .npmrc file or the npm secret.
npm…

Gerry Saporito
- 81
- 2
- 8
2
votes
0 answers
how to fix the "npm WARN config `_auth`, `_authToken`, `username` and `_password` must be scoped to a registry." issue
Any time I use nom command I get this warning in the beginning:
npm WARN config `_auth`, `_authToken`, `username` and `_password` must be scoped to a registry. see `npm help npmrc` for more information.
npm WARN config `_auth`, `_authToken`,…

Anton
- 95
- 11
2
votes
3 answers
How can I use GitHub secrets in a .npmrc file?
I have a project on GitHub that has several dependencies all of which are published on GitHub Package Registry.
I use GitHub actions to publish my packages. I am able to use GitHub secrets in my workflow.yml file but not so in my .npmrc file.
As…

Mani Shankar
- 33
- 2
2
votes
1 answer
.npmrc removes vulnerable packages statement during npm install
If I remove the .npmrc file and do "npm install", it shows me the found vulnerabilities.
When I include my .npmrc file has only the registry url and do "npm install", i can't see the vulnerable packages. Maybe I am missing any config in the file…

d1fficult
- 931
- 8
- 18
2
votes
1 answer
Defining a specific registry for a specific package in .npmrc file
I've just come up against something I haven't encountered before.
I have the following need whereby I have private node packages published to both a private and public repository under the same @scope. The packages I have published to npmjs.org are…

Micheal J. Roberts
- 3,735
- 4
- 37
- 76
2
votes
0 answers
Configure `.npmrc` to get one scoped package module from npm and the others from github packages
I'm using a scoped package in my application, some modules from it are stored on GitHub packages and the rest are in npm registry. Till now I was using only one module that is stored on GitHub, but now I need to install another one stored on…

Vardan
- 55
- 1
- 10
2
votes
2 answers
NPM insists on CodeArtifact, even on public registry
I'm using npmrc to setup my corporate (using CodeArtifact) and public (using registry.npmjs.org) NPM registries.
The problem is that, even with the public profile selected, I keep getting an error that the authentication to CodeArtifact is missing.…

Mauricio Klein
- 527
- 2
- 12