Questions tagged [npmrc]
12 questions
2
votes
0 answers
.npmrc failed to replace env in config
Me and my colleagues have a problem with .npmrc
Most of us are on Mac OSx and this works
@REGISTRY_NANME:registry=https://gitlab.com/api/v4/packages/npm/ //gitlab.com/api/v4/packages/npm/:_authToken=${NPM_TOKEN}
But for me it don't work, but without…

Mike
- 61
- 1
- 2
1
vote
0 answers
using environment variable instead of PAT in .npmrc file
I am trying to not use my PAT stored in the .npmrc file that is checked into the root of my repository.
Right now, I have a GitHub Actions workflow setup that publishes a package to our GitHub package registry. Everything works well as long as I…

Mani Shankar
- 33
- 2
1
vote
1 answer
Using ARG in my Dockerfile but still getting "Failed to replace env in config" when running my build
I have this file (.npmrc.docker)
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
And in my Docker file I have
ARG NPM_TOKEN
RUN mv .npmrc.docker .npmrc
RUN yarn install
However when I run my Docker build with
NPM_TOKEN=mySecretToken docker build…

Dave
- 15,639
- 133
- 442
- 830
1
vote
0 answers
npmrc file for different folders
I have .npmrc file in the my root folder with package.json file.But I still have client folder and server folder with their own package.json files.How I can share this npmrc to my server and client folder.Thank you

Vadszh Makedonski
- 57
- 2
- 7
1
vote
0 answers
NPM Private Registy Packages - Auth Token Security Management
We are have Nodejs API written in Typescript. We are using NPM Packages from Gitlab private registries. We have the Registry URL and Token. We need to store that in the Project in .npmrc file.
But the question is how do we store the auth token…

Silly John
- 1,584
- 2
- 16
- 34
1
vote
1 answer
Private npm registry with fallback to global registry
Installing the npm package from the global registry( https://registry.npmjs.com ), if that package does not exist, install it from Azure Artifacts.
To do this:
First I create .npmrc in the root directory where the package.json file…

Shiraz Rayan
- 31
- 1
0
votes
1 answer
.npmrc permission denied every time I open the terminal
I've been getting this annoying error everytime I open a new terminal window or tab saying:
bash: /.npmrc: Permission denied
And that is it, I have been trying to find a solution (unsuccessfully) for some time now. I've found that people had issue…

Mehmed Duhovic
- 57
- 10
0
votes
0 answers
How to ignore .npmrc config locally
I've added .npmrc file to the root of my project with next content:
arch=x64
platform=linux
This helps GitLab CI to build node_modules of my app for AWS Lambda for right architecture and platform.
But this broke my local development. yarn install…

acidernt
- 2,173
- 2
- 19
- 33
0
votes
0 answers
What are the options of managing multi npm registries?
Working with multiple npm registies and changing manual npmrc files can be a lot of additional work, so are there some better option to save and switch between multiple npmrc files or manage the registry quickly?
I would be interested to explore any…

badrddinb
- 17
- 8
0
votes
0 answers
npm config rebuild-bundle set to false producing unexpected behavior
As defined in the npm package.json docs, in npm 8 and above, I can set bundleDependencies to the boolean value true, which will bundle all of my dependencies. However, every time I install a new package, npm automatically enumerates a list of…

ansona
- 791
- 4
- 2
0
votes
0 answers
How to configure two different package with different projectId in same registry on .npmrc file
I have two different npm packages generated on my gitlab registry. I need to import both the packages in my new project.
Both the project has different projectId.
How can I configure this in my npmrc file?
I have done the below for one…

Ashwin Allen
- 99
- 1
- 6
0
votes
0 answers
project not using .npmrc file
I have .npmrc file at the root in my project. But for some reason npm i doesn't use that for proxy. Instead it is picking up my bash_profile. Can someone please help how to force use .npmrc file?

Gaurav
- 1,332
- 11
- 22