benjamn / benjamn/wryware

`@wry/caches` is not compatible with `moduleResolution = node16`

Open
#646 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
91
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Trying to use `@wry/caches` in a package with `moduleResolution` set to `node16` (or `nodenext`) fails with the errors:

```
node_modules/@wry/caches/lib/strong.d.ts:1:34 - error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './common.js'?

1 import type { CommonCache } from "./common";
~~~~~~~~~~

node_modules/@wry/caches/lib/weak.d.ts:1:34 - error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './common.js'?

1 import type { CommonCache } from "./common";
~~~~~~~~~~
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting node_modules/@wry/caches/lib/strong.d.ts and lib/weak.d.ts, especially their relative imports of ./common. Reproduce the failure with TypeScript using moduleResolution node16 or nodenext, then verify that the published declarations compile without TS2835 errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.