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

v5.23.0: Module '"@tolgee/i18next"' has no exported member 'Tolgee'.ts #3416

Open
flolu opened this issue Jan 9, 2025 · 3 comments · May be fixed by #3417
Open

v5.23.0: Module '"@tolgee/i18next"' has no exported member 'Tolgee'.ts #3416

flolu opened this issue Jan 9, 2025 · 3 comments · May be fixed by #3417
Assignees

Comments

@flolu
Copy link

flolu commented Jan 9, 2025

Importing Tolgee fails starting from @tolgee/i18next v5.23.0.

This line:

import { Tolgee } from '@tolgee/i18next';

Throws:

Module '"@tolgee/i18next"' has no exported member 'Tolgee'.ts

It works fine with @tolgee/i18next v5.22.0.

@stepan662
Copy link
Collaborator

Hey, we've changed the build system to vite on the web package in that release. Could you share more about your environment?

@flolu
Copy link
Author

flolu commented Jan 10, 2025

@stepan662 sure, I've set up a minimal reproduction: https://github.com/flolu/tolgee-i18next-v5-23-issue (TypeScript built with SWC, uses Node.js ESM)

@stepan662 stepan662 linked a pull request Jan 10, 2025 that will close this issue
@stepan662
Copy link
Collaborator

Hey, I was digging into this, however I was not able to find a satisfying solution. The issue seems to be triggered by "moduleResolution": "node16". In our package "@tolgee/web", we have "type: module", which seems to cause typescript in this mode resolution is failing to import relative paths without file extension. However I didn't find any way how to force tsc to include file extensions in .d.ts files.

The issue is actually fixed if I remove "type: module" from our package, but that causes many other issues for us, so that is not currently possible.

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

Successfully merging a pull request may close this issue.

2 participants