Search code examples
node.jsazureazure-artifactsnpm-package.npmrc

Upstream packages in Artifacts Feed not uploading packages after first npm install


I'm trying to use an npm package I created in my Artifacts feed, I got my .npmrc file in place to go directly to azure feed, first time I run 'npm install' noticed that there are a lot of new npm packages coming because of the upstream configuration I have in 'Upstream sources' section in my feed, but after that if I want to add a new package reference in my project I got an error saying 'No matching version found for @' this is because package is not there in artifacts feed but in this case shouldn't it go to 'https://registry.npmjs.org/' to get the package reference and place it in upstream packages in Azure feed?

here is the code I have in my .npmrc file

registry=https://pkgs.dev.azure.com/<enterprise-name>/_packaging/<feed-name>/npm/registry/

always-auth=true

Solution

  • It seems that you don't have the required permission to UpStream source of that private feed. You can follow my steps to locate the issue and resolve it:

    1.Go Feed Settings to make sure npmjs is set as Upstream source. And use the Move up button to move npmjs source to the top of the list (List of Upstream source).

    2.Go Views tab in feed settings and check who can access the @Local view. Note:

    @local contains all packages pushed to this feed and all packages saved from an upstream source

    Try editing the @Local view and make people in current org can access it. Also you can choose Specific People, but you need to grant access to yourself.

    3.Make sure the Account/PAT you use for authentication is the same account you use to configure in web Portal. (The local account used by the authentication must have the access to the @Local view in feed)

    If that not helps, check whether the package version you're looking for exists in even UpStream source and share the details of error message here. More details please refer to this document carefully.