6
votes

We have an Azure Artifact feed with an upstream source of https://registry.npmjs.org/.

Through this Azure Artifact feed, I can download the following npm package:

But I can't download the following version of the same package:

If I go direct to npm (not through the artifact feed) I can pull both versions as expected.

Is there anyway to diagnose this issue further?

2
Hi, Not get your latest information, are the answers below helpful for you? Or if you have any concern, feel free to share it hereVito Liu
Hi @Drew Williams, Just checking in to see whether this issue is still blocking you now? Any update for this issue?Vito Liu
@VitoLiu-MSFTthis is causing major disruptions to our CI/CD. Any more input?Drew Williams
We've put this down to the retention policy on Artifacts.Drew Williams
@Drew Williams, did you find a solution to this issue? I see you discovered the root cause. We are having a similar problem.emaia

2 Answers

0
votes

The download package version is driven by the one specifying the versions in the package.json. So what you could do is simply modify the package.json and run a npm install then. Be sure to clear out the node_modules directory before you do that. Then we could specific npm package version to download in the Azure DevOps pipeline. Please check this doc for more details.

Also, we could run npm install <package>@<version> to install an older version of a package. We could add the --save flag to that command to add it to your package.json dependencies, or --save --save-exact flags if you want that exact version specified in your package.json dependencies.

0
votes

Not really sure as to why the issue happened... but I was able to solve it in my case by following these steps:

  1. Navigate to "Artifacts" within Azure
  2. Select your private NPM feed in the dropdown
  3. Click on "recycle bin" at the top of the screen
  4. Find the package which you're having trouble with
  5. Click restore on the package version