Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@wry/caches is not compatible with moduleResolution = node16 #646

Open
simon-abbott opened this issue Jan 8, 2025 · 1 comment
Open

Comments

@simon-abbott
Copy link

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";
                                   ~~~~~~~~~~
@benquarmby
Copy link

Thanks for raising this. I just observed the same error, but with @wry/caches as a transitive dependency of @apollo/client. I'm still a bit confused because normally this error would only affect the package being built, not its dependencies. For reference, the TypeScript version being used here is 5.7.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants