You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dnt fails to traverse directories/identify the correct base directory across folders specified in a deno.json import map, if the import used is more than one directory deep.
import { thing } from "project-two/one-more-folder/mod.ts";
— it fails with the following error:
[dnt] Transforming...
error: Uncaught (in promise) "Error stripping prefix of /Users/dylan/dev/scratchpad/dnt-repro/project-two/one-more-folder/mod.ts with base /Users/dylan/dev/scratchpad/dnt-repro/project-one"
It works (which it does without the extra nested directory, and in most other similar cases)
Actual output:
$ deno run -A compile.ts
[dnt] Transforming...
error: Uncaught (in promise) "Error stripping prefix of /Users/dylan/dev/scratchpad/dnt-repro/project-two/deeper/mod.ts with base /Users/dylan/dev/scratchpad/dnt-repro/project-one"
The text was updated successfully, but these errors were encountered:
Seems to me (with my very limited rust knowledge) that this line in mappings.rs fails because the whole "context" assumes that importmaps won't reference paths outside of the project directory?
This is a bit hard to understand without seeing the actual directory structure, so I've put a reproduction together here:
https://github.com/dylanpyle/dnt-repro
dnt
fails to traverse directories/identify the correct base directory across folders specified in adeno.json
import map, if the import used is more than one directory deep.So, if your
deno.json
contains:— and you import something e.g.
— it fails with the following error:
Reproduction steps:
cd project-one
deno run -A compile.ts
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: