5t1111115
Denoβ€’16mo ago
5t111111

What is the right way to publish a module that depends on a package hosted on deno.land/x to JSR?

I am developing a module that depends on a package hosted only on deno.land/x . When importing modules with the https specifier, you know, it is unable to publish them to JSR.

Therefore, I referred to this page (https://jsr.io/docs/migrate-x-to-jsr#manually-refactor-your-package) and tried to resolve the issue by specifying "vendor": true in
deno.json
to download the dependent packages into the vendor directory, then committing them to Git.

However, when I try to import modules from the ./vendor directory, I get the error Importing from the vendor directory is not permitted .

How can I resolve this issue and publish a module that depends on a package hosted exclusively on deno.land/x to JSR?
Packages currently hosted on deno.land/x can be migrated to JSR. Follow this guide to learn how.
Was this page helpful?