Setup
I have created a new project using dotnet new react
.
My code is on Azure DevOps GIT.
I am using a npm module published on a private registry in the same ADO organization.
Issue
In my build pipeline, my dotnet publish
task fail with the following error
npm ERR! code E401
npm ERR! Unable to authenticate, need: Bearer authorization_uri=https://login.windows.net/xxxxxxxxxxxxxxxx, Basic realm="https://xxxxxxxxxxx.pkgs.visualstudio.com/", TFS-Federated
npm ERR! A complete log of this run can be found in:
npm ERR! C:\npm\cache\_logs\2020-10-23T16_16_30_880Z-debug.log
D:\a\1\s\Portal.csproj(48,5): error MSB3073: The command "npm install" exited with code 1.
Things I have tried
- Added an npm authentciate task before the dotnet publish task. That task passes but I get the 401 error in the publish task.