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

The type declarations are not compatible with NodeNext #251

Closed
tmkx opened this issue Jun 26, 2023 · 2 comments · Fixed by #256
Closed

The type declarations are not compatible with NodeNext #251

tmkx opened this issue Jun 26, 2023 · 2 comments · Fixed by #256
Labels
bug Something isn't working

Comments

@tmkx
Copy link
Contributor

tmkx commented Jun 26, 2023

Environment

TS 5.1.3

Reproduction

tsconfig.json

{
  "compilerOptions": {
    "moduleResolution": "NodeNext"
  }
}

index.ts

import {} from 'ofetch';

Error: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("ofetch")' call instead.

Describe the bug

The type declarations are not compatible with NodeNext

Additional context

No response

Logs

No response

@tmkx tmkx mentioned this issue Jul 19, 2023
8 tasks
@pi0
Copy link
Member

pi0 commented Jul 19, 2023

We might try new .d.mts and .d.cts generation support from unbuild rc.

@tmkx
Copy link
Contributor Author

tmkx commented Aug 2, 2023

unjs/unbuild#273 is not released yet

@Hebilicious Hebilicious added the bug Something isn't working label Aug 8, 2023
@pi0 pi0 closed this as completed in #256 Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants