Skip to content

deno audit does not respect subpaths in NPM_CONFIG_REGISTRY #32106

Closed

Description

@iownbey

Version: Deno 2.6.8

When using deno audit I am getting the message:

error: Failed to deserialize response from the npm registry API

Caused by:
    invalid type: integer `404`, expected struct AuditResponse at line 1 column 3

Even though I have verified that the endpoints for auditing my npm registry are working.

I'm pretty sure I have it narrowed down to

let url = npm_url.join("/-/npm/v1/security/audits").unwrap();

My NPM_CONFIG_REGISTRY is of the form www.server.com/path/to/npm/registry

and using join here with the leading slash is trimming off the /path/to/npm/registry/ according to https://docs.rs/url/latest/url/struct.Url.html#method.join

I'd be happy to commit the fix if I'm correct here. Pretty sure it should be changed to:

 let url = npm_url.join("-/npm/v1/security/audits").unwrap(); 

Activity

  1. added theissue type on Feb 10, 2026
  2. dsherret commented on Feb 10, 2026

    @dsherret
    Contributor

    I'd be happy to commit the fix if I'm correct here. Pretty sure it should be changed to:

    I think so. Thanks!

  3. iownbey commented on Feb 13, 2026

    @iownbey
    ContributorAuthor

    I've got a few tests that are failing that I'm 90% sure have to do with me missing something in my dev environment rather than my change. If I put up a PR is there ci that will double check my assumption?

  4. marvinhagemeister commented on Feb 13, 2026

    @marvinhagemeister
    Contributor

    yes, we do use a CI to automatically run tests and check if the code is correct for every PR.

  5. added a commit that references this issue on Feb 18, 2026
    409b1d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions