title | description | ms.assetid | ms.service | ms.custom | ms.topic | ms.date | monikerRange | recommendations |
---|---|---|---|---|---|---|---|---|
Publish npm packages from the command line |
Learn how to connect to your feed and publish npm packages from the command line. |
85773969-1491-4242-A060-BD5D193961A0 |
azure-devops-artifacts |
engagement-fy23 |
tutorial |
02/21/2025 |
<=azure-devops |
true |
[!INCLUDE version-gt-eq-azure-devops-2019]
This article guides you through authenticating with your Azure Artifacts feed and publishing npm packages from the command line.
Product | Requirements |
---|---|
Azure DevOps | - An Azure DevOps organization. - An Azure DevOps project. - An Azure Artifacts feed. - Download and install Node.js and npm. |
If this is your first time using Azure Artifacts with npm on your machine, follow the steps below to set up your environment:
-
Download Node.js and npm.
-
Run the following command to install
vsts-npm-auth
.npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
-
Download Node.js and npm.
-
Create a Personal Access Token with Packaging > Read & write scope.
-
If you haven't authenticated with your feed yet, follow the steps in the Project setup to connect to your feed and then proceed with the next step once you're done.
-
Run the following command in your project directory to publish the npm packages listed in your package.json:
npm publish