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

Uncaught TypeError: import_react_ga4.default.initialize is not a function #23

Open
julenr opened this issue Mar 20, 2023 · 3 comments
Open

Comments

@julenr
Copy link

julenr commented Mar 20, 2023

Hi,

With:
import ReactGA from 'react-ga4';
ReactGA.initialize('G-8XZ6X4KJQH');

I am having this error Uncaught TypeError: import_react_ga4.default.initialize is not a function

It seems to work if I use ReactGA.default.initialize('G-8XZ6X4KJQH');

using ESBuild 0.15.12

Thanks

@elrob
Copy link

elrob commented Jun 25, 2023

I'm experiencing the same issue. Also using esbuild.

@layonferreira
Copy link

This is probably due to the fact that you have type: module in your package.json.
You can read more here
https://esbuild.github.io/content-types/#default-interop)

@nichita-pasecinic
Copy link

Did anyone managed to workaround this ?

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

4 participants