hewlothereH
Denoโ€ข16mo agoโ€ข
24 replies
hewlothere

deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?

heya!

i'm having difficulty with getting npm: specifiers to work. i've tried them via an import like below, or running via the cli. both give a 401 error for any package (regardless of if it's scoped, unscoped, using a specific npm config registry or anything).

i tried this in all of stable, canary and rc deno versions - all have the same. i'll include debug logs from the latest rc

it used to work a few weeks ago, then it stopped working with all versions for a bit, then i created a new artifactory token and put that in my npmrc and it worked for a few days, and now it's back to not working again?

if it makes any difference, i'm using company vpn. and i had vscode closed and i was using a new terminal for this test, same result :/

both of these don't work and give this error:
error: Error getting response at https://packages.mycompany.com/artifactory/api/npm/npm-remote/@angular/cli for package "@angular/cli": Bad response: 401

{
  "errors" : [ {
    "status" : 401,
    "message" : "Bad credentials"
  } ]
}

import { thing } from 'npm:literally-anything';

deno run -A npm:@angular/cli


i'll add debug logs and configs in the following messages
Was this page helpful?