Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    KeyNotFoundException The given key was not present in the dictionary with specific npm packages

    Scheduled Pinned Locked Moved Support
    2 Posts 2 Posters 11 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jonathan.erlich_0694
      last edited by jonathan.erlich_0694

      Hi, I have an npm feed with a connector to our Artifactory, as we are working on migrating away from it.
      On one specific package, which 100% works when running npm install from artifactory, I'm getting the following error when running npm install with ProGet as the source. This specific feed is only a connector to our Artifactory, so everything that works there should work here. It also doesn't work when accessing the package in ProGet in the browser. (this is when trying to access it in the browser):

      An error occurred in the web application: The given key was not present in the dictionary.
      
      URL: https://proget.company.loc:8625/feeds/npm-all6/browser-sync/versions
      Referrer: https://proget.company.loc:8625/feeds/npm-all6?Search=browser-sync
      User: Admin
      User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
      Stack trace:    at Inedo.ProGet.Feeds.Npm.NpmConnector.RemotePackage2.GetPUrl(JsonElement package)
         at Inedo.ProGet.Feeds.Npm.NpmConnector.GetPackagesAsync(PackageNameId name, String version, CancellationToken cancellationToken)+MoveNext()
         at Inedo.ProGet.Feeds.Npm.NpmConnector.GetPackagesAsync(PackageNameId name, String version, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
         at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListPackageVersionsAsync(BrowsablePackageId id)
         at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListPackageVersionsAsync(BrowsablePackageId id)
         at Inedo.ProGet.WebApplication.Pages.Packages.Versions.ListPackageVersionsPageBase.CreateChildControlsAsync()
         at Inedo.ProGet.WebApplication.Pages.ProGetSimplePage.InitializeAsync()
         at Inedo.Web.PageFree.SimplePageBase.ExecutePageLifeCycleAsync()
         at Inedo.Web.PageFree.SimplePageBase.ProcessRequestAsync(AhHttpContext context)
         at Inedo.Web.AhWebMiddleware.InvokeAsync(HttpContext context)
      

      This is the npm logs:

      16:33:04          npm http 500 https://proget.company.loc:8625/npm/npm-all6/browser-sync
      16:33:04          npm verb headers { 'content-length': '92',
      16:33:04          npm verb headers   'content-type': 'application/json',
      16:33:04          npm verb headers   date: 'Wed, 19 Nov 2025 14:31:50 GMT',
      16:33:04          npm verb headers   server: 'Kestrel',
      16:33:04          npm verb headers   'cache-control': 'private' }
      16:33:04      2>npm info retry will retry, error on last attempt : error : KeyNotFoundException The given key was not present in the dictionary.: npm [path\to\csproj]
      

      It seems like an internal issue in ProGet caused by the json of this specific package. The package page is also inaccessible in ProGet (error 500).

      This is what
      Help would be appreciated.

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @jonathan.erlich_0694
        last edited by

        Hi @jonathan-erlich_0694 ,

        Based on the stack trace, there's something wrong with the data being returned via the API from the remote connector. Specifically, one/more of the version objects being returned is missing a name or version property,

        Based on the URL, the invalid data is at the {repository-root-url}/browser-sync. Here's what it's supposed to look like, based on the public repository at least:
        https://registry.npmjs.org/browser-sync

        Thanks,
        Alana

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation