See official documentation.
Setting up a private NPM registry
Artifacts in Azure DevOps site.
- Click Connect to feed.
npm as a feed type.
- Select Other tab in Project Setup (Assuming you are not on Windows).
- Read instructions how to create
.npmrc with PAT token.
- Place the new
.npmrc in your NPM project's root and you are ready to go.