denoland / denoland/dnt

Cannot resolve package subpaths in type checking phase

Open
#140 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
1.3k
Forks
49
PR merge metrics
No merged PRs in 30d

Description

In the `mappings` config you can do stuff like this:

```js
"https://deno.land/x/my_module/extras": {
name: "my-module",
version: "1.0.0",
subPath: "extras",
}
```

I tried this today and `dnt` will even check that `my-module` even has `extras` in its exports field. Cool.

But it can never get past the type checking phase:

```
[dnt] Type checking...
some/path - error TS2307: Cannot find module 'my-module/extras' or its corresponding type declarations.
```

I know from painful experience that TS does not yet have support for the package.json `exports` field unless the tsconfig is changed to have `module: 'nodenext', moduleResolution: 'nodenext'`. Could that have something to do with it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.