2

F:\angular library\sampleangular>npm install examplepackage@0.0.1 npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/examplepackage- Not found npm ERR! 404 npm ERR! 404 'examplepackage@0.0.1' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jack\AppData\Roaming\npm-cache_logs\2020-03-03T06_07_13_338Z-debug.log

Vignesh Arvind
  • 531
  • 2
  • 7
  • 16
  • Do you run the npm install command in directory where exists your packages.json file? And please sign in the azure devops web portal to make sure the package is successfully published there. (Check azure devops artifacts UI) – LoLance Mar 04 '20 at 10:25
  • Yes...i executed npm install command by using npm install -- registry=https://pkgs.dev.azure.com/organization*******/npm/registry After that i ran npm install pacckages@1.0.0 – Vignesh Arvind Mar 04 '20 at 10:35
  • 1
    Instead of specifying the registry in command.What's the result if you setup the .npmrc file following [this document](https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-npm?view=azure-devops&tabs=windows#set-up-your-npmrc-files), still same issue? – LoLance Mar 05 '20 at 10:14
  • Hi, is there any update for this issue? If it persists to block you, please feel free to let me know :) – LoLance Mar 10 '20 at 06:58

2 Answers2

2

We have the same error (E404). The root cause turned out, is because we have multiple registry sources. One is our own registry and the other is public registry (registry.npmjs.org)

To resolve this, we added both registries in the .npmrc file (can be in either user's .npmrc or the project .npmrc).

We append the following lines in the .npmrc file.

@contosoPrivateFeed:registry=https://contoso.pkgs.visualstudio.com/_packaging/Contoso.Feed/npm/registry/
registry=https://registry.npmjs.org

Also worth to mention, we don't have Upstream setup in our Azure DevOps feed. Specifying multiple registries allow npm commands to use the registries. Thus, no need to setup Upstream sources.

stack247
  • 5,579
  • 4
  • 41
  • 64
  • I hate that this is still the only solution. What is the point of an upstream source if it cannot be pulled from? – DigiBanks99 Feb 01 '23 at 05:51
1

After some tests, we think your issue may be related to the UpStream source in Azure devops feed settings.

enter image description here

Here's some info when I do the test:

enter image description here

nest is package from default npm packages. When i deleted the npm upstream source, I got the same error when running command npm install nest. After that I added the NPM public source(npmjs) as one upstream sources in feed settings, then it worked when I ran the command the second time.

So you need to add npmjs as Upstream source of your current feed. Hope it helps :)

LoLance
  • 25,666
  • 1
  • 39
  • 73