1
votes

I have been tasked with something that is entirely outside of my knowledge. Using devops...

What I am asked to do is take a typescript library, compile it into an npm package, publish it to DevOps (as an artifact?) and pull it as a dependency to an angular project.

I have never worked with devops, and none of my colleagues have an idea how I can do this, which brings me to SO for help...

I have so far managed to get a pipeline to run npm install and npm build and made an access token. The problem I think I am having is that I cannot access the npm package from the server in my VSCode... It is telling me I do not have the right credentials... as it is giving me a E401 with unable to authenticate...

https://hatebin.com/pjntlhjocn

Edit: I have tried the steps https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page. the mention needing to use password and username with the PAT. but its not specified where...

1
You are not clear, did you succeed to package the typescript to npm package and publish it to Azure DevOps? when you got an error, when you try to run npm install in the angular project?Shayki Abramczyk
The project was uploaded as a typescript project to DevOps by my boss. I ran a build pipeline on it with first npm install followed by npm publish which made it appear in the artifacts. From there I need to download it as a dependency for angularTorben Van Assche

1 Answers

0
votes

Here's a similar problem as you met: code E401.

It is possible that there's a mismatch in your .npmrc file which you can find the solution in above link.

If you have no idea about this .npmrc file, please check Set up your client's npmrc for more information. This should be the information you are currently looking for。