Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How configure private NPM registry in Azure Devops? #919

Closed
persyl opened this issue Feb 1, 2021 · 4 comments
Closed

How configure private NPM registry in Azure Devops? #919

persyl opened this issue Feb 1, 2021 · 4 comments
Assignees

Comments

@persyl
Copy link

persyl commented Feb 1, 2021

Bug Report

I'm building a Azure Static web app and it works fine but I want to use my private registry for NPM packages and can not get it to work or find documentation about how to do it.

My private registry is at: https://pkgs.dev.azure.com/MY-ORG-NAME/_packaging/MY-NPM-FEED-NAME/npm/registry/

I have a file .npmrc in the root

https://pkgs.dev.azure.com/MY-ORG-NAME/_packaging/MY-NPM-FEED-NAME/npm/registry/:username=foo
https://pkgs.dev.azure.com/MY-ORG-NAME/_packaging/MY-NPM-FEED-NAME/npm/registry/:_password=MY-SECRET-HERE
https://pkgs.dev.azure.com/MY-ORG-NAME/_packaging/MY-NPM-FEED-NAME/npm/registry/:email=foo@bar.com
@qianz2
Copy link
Contributor

qianz2 commented Feb 2, 2021

Hello @persyl, for nodejs apps, we have a NPM_REGISTRY_URL setting key which allows you to specify custom NPM registry URL. Will be written to .npmrc during the build. Could you give it a try and see if it can resolve your issue?

@persyl
Copy link
Author

persyl commented Feb 3, 2021

Well @qianz2 I have tried it and hopefully the correct way, as you can see in my posting here:

Azure/static-web-apps#44 (comment)

I put NPM_REGISTRY_URL (and other variables) under env as you can see.
Should I put them in another place?!

@qianz2 qianz2 self-assigned this Mar 9, 2021
@qianz2
Copy link
Contributor

qianz2 commented Mar 9, 2021

Hello @persyl , Could you share what's the logs after you run this workflow? I want to know if the .npmrc file is being read or not. We'll add this issue to our backlogs.

@qianz2
Copy link
Contributor

qianz2 commented Jun 4, 2021

Let us know if you have other following up questions, closing the issue now.

@qianz2 qianz2 closed this as completed Jun 4, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants