Joseph
Install a local deno package
I want to use a local deno package as a dependency in a second local deno package, and I don't want to include the first package's imports as dependencies of my second package.
To spell it out, say I am developing a local package
foo
located at stuff/foo/deno.json
which has a few imports from jsr, npm, etc.
Now I have another project stuff/bar/deno.json
and the file stuff/bar/main.ts
contains import * from "foo"
.
How do I make foo
resolve to my local package?
If I have "foo": "/full/path/to/stuff/foo/entrypoint.ts"
under "imports"
in stuff/bar/deno.json
, then deno run stuff/bar/entrypoint.ts
complains that it can't find all the jsr, npm, etc dependencies of my first project.
I've tried hosting foo
on GitHub, but this doesn't actually change anything.
I've tried bundling foo
, but that's a whole different can of worms that produces ridiculous bundle sizes.
Surely importing other local deno packages is possible?11 replies