Skip to content

Cannot resolve jsrdependency when building npm package #378

@cowboyd

Description

@cowboyd

I'm migrating https://github.com/thefrontside/effection to use https://jsr.io

It consumes a package that had previously been hosted at https://deno.land/x but is now on jsr at https://jsr.io/@frontside/continuation

However, now, when I try to build this package for npm using dnt, I get the following error:

$ deno task build:npm
Task build:npm deno run -A tasks/build-npm.ts
[dnt] Transforming...
Download https://registry-staging.deno.com/@frontside/continuation/meta.json
WARN Failed fetching https://registry-staging.deno.com/@frontside/continuation/meta.json. Retrying in 250ms...
WARN Failed fetching https://registry-staging.deno.com/@frontside/continuation/meta.json. Retrying in 500ms...
WARN Failed fetching https://registry-staging.deno.com/@frontside/continuation/meta.json. Retrying in 1000ms...
panicked at wasm\src\lib.rs:24:1:
unexpected exception: JsValue(TypeError: error sending request for url (https://registry-staging.deno.com/@frontside/continuation/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
TypeError: error sending request for url (https://registry-staging.deno.com/@frontside/continuation/meta.json): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
    at async mainFetch (ext:deno_fetch/26_fetch.js:170:12)
    at async fetch (ext:deno_fetch/26_fetch.js:391:7)
    at async fetchWithRetries (https://deno.land/x/deno_cache@0.6.2/file_fetcher.ts:280:19)
    at async FileFetcher.#fetchRemote (https://deno.land/x/deno_cache@0.6.2/file_fetcher.ts:209:22)
    at async FileFetcher.fetch (https://deno.land/x/deno_cache@0.6.2/file_fetcher.ts:261:24))

steps to reproduce:

git clone https://github.com/thefrontside/effection --branch jsr
deno task build:npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions