node.jsnpmnpm-installartifactory

Artifactory NPM Virtual Repository Error 404 when installing package


When creating a virtual NPM Repository with include pattern, you are no longer able to download the package from the repository.

I filter the Package base-hmi-test/**

enter image description here

As you can see in the picture, its there.

enter image description here

But with npm install i get a 404 error:

npm error code E404
npm error 404 Not Found - GET https://repository.company.com/artifactory/api/npm/dev-xxx-xxx-internal-mirror/base-hmi-test
npm error 404
npm error 404  'base-hmi-test@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-04-11T06_45_26_174Z-debug-0.log

enter image description here When i remove the include filter, and have all packages from the underlying local repository, it works like a charm.

added 23 packages, and audited 73 packages in 1s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

It seems there is a bug in Artifactory, because I can do it with every package i want, and it stops working.

Does someone have gotten the same issue, or a solution to this?


Solution

  • The Answer is:

    I was missing the Metadata in my include rules. You also have to add .npm/yourpackage/**

    enter image description here