Publish an npm package from the command line

Azure DevOps Services | TFS 2018 | TFS 2017

This article will show you how to connect your npm client to your feed in Azure Artifacts and share your packages with your team and your organization.

If you don't have a feed yet, check out the Create a feed section in the npm quickstart to set up your own Azure Artifacts feed.

Publish your packages

To publish an npm package to your feed, follow these steps:

  1. Set up the npm client with your feed.

  2. Open a shell and navigate to the directory that contains your package's package.json file. If you don't have a package.json file, run the following command:

    npm init

    See the npm CLI docs for a list of npm commands.

  3. Push your package to your feed

    npm publish

    See the npm publish docs for more information on the publish command.

What's next?

Check out the Azure Artifacts landing page to learn about other topics.