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

Cannot find typings with NextJS (module: esnext) #12

Open
vfabioux opened this issue Sep 11, 2024 · 0 comments
Open

Cannot find typings with NextJS (module: esnext) #12

vfabioux opened this issue Sep 11, 2024 · 0 comments

Comments

@vfabioux
Copy link

Hi,

Thanks a lot for the package, I knew someone must have had the same idea (even though I want to use it for more than intl: for "variants" of messages)!

I have an error when trying to import anything in this library with NextJS:
Could not find a declaration file for module 'intl-ts'. '/node_modules/intl-ts/lib/module.mjs' implicitly has an 'any' type. There are types at '/node_modules/intl-ts/lib/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'intl-ts' library may need to update its package.json or typings.

Steps to reproduce:

  • Create a NextJS app with default settings (npx create-next-app@latest).
  • Try to import a function such as createMessages from this library into any TS file.

It works when I revert the changes from commit 1a00bcb. I'm not sure how to fix it properly without breaking retrocompatibility though.
tsconfig.json

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

1 participant