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

Native ESM not supported #46

Open
gustavopch opened this issue Jul 11, 2024 · 0 comments
Open

Native ESM not supported #46

gustavopch opened this issue Jul 11, 2024 · 0 comments

Comments

@gustavopch
Copy link

gustavopch commented Jul 11, 2024

When I write:

import Gleap from 'gleap'

Gleap.initialize('abc123')

I get the error:

Property 'initialize' does not exist on type 'typeof import("<omitted>/node_modules/gleap/index")'.

This seems to happen specifically if I have "type": "module" in package.json and "moduleResolution": "nodenext" in tsconfig.json.

Workaround I'm using for now:

import Gleap from 'gleap'

const Gleap = GleapModule as any as typeof GleapNamespace

Gleap.initialize('abc123')
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