-
-
Notifications
You must be signed in to change notification settings - Fork 991
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
Viem can not be compiled with node16/bundle module resolution by tsc #2621
Comments
Any update/workaround on this issue? |
|
@jxom |
It's a workaround. |
Resolved via #3232 |
This issue has been locked since it has been closed for more than 14 days. If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread. |
Check existing issues
Viem Version
2.19.6
Current Behavior
Goes through this error:
Expected Behavior
It should be compiled when
module: node16
ormodule: esnext
andmoduleResolution: bundler
enabled.Steps To Reproduce
Try to run on my repo:
Link to Minimal Reproducible Example
https://github.com/mojtabast/viem-tsc-compile-node16-issue
Anything else?
The problem is on
node16
you can not import directly from a cjs module during ESM spec. it seemswebauthn-p256
is cjs and somewhere you are importing a type from a cjs module:Although, typescript should differentiate a normal import and a type import, but it doesn't do that. You can follow some discussion around this here:
The text was updated successfully, but these errors were encountered: