NPM packages are incorrectly assumed to have downloaded into the registry.npmjs.org
cache
#139
Labels
bug
Something isn't working
registry.npmjs.org
cache
#139
The
esbuild_deno_loader
assumes that NPM packages are in a deno cache sub folder namedregistry.npmjs.org
- (see hard coded value here)Unfortunately this assumption breaks now that Deno supports private NPM packages via an
.npmrc
file (see release notes) where the registry name is likely to be different (e.g.npm.pkg.github.com
)Are there any plans to support alternative registries, or any obvious workarounds that might make this work?
Background
I have a private NPM package in the GitHub NPM registry so I use an
.npmrc
file that looks like this...A regular Deno
import { foo } from "MY-PACKAGE
works fine, and Deno downloads the package into~/.cache/deno/npm/npm.pkg.github.com/MY-PACKAGE
... but if I try to bundle it with the
esbuild_deno_loader
it throws an error because it assumes the source is in~/.cache/deno/npm/registry.npmjs.org/MY-PACKAGE
✘ [ERROR] No such file or directory (os error 2): stat '/home/jake/.cache/deno/npm/registry.npmjs.org/@MY-PACKAGE/0.0.1' [plugin deno-loader]
The text was updated successfully, but these errors were encountered: