Skip to content

Error: Google Analytics Library Issue with WebPack #4269

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

Open
gssakash-SxT opened this issue May 10, 2023 · 0 comments
Open

Error: Google Analytics Library Issue with WebPack #4269

gssakash-SxT opened this issue May 10, 2023 · 0 comments
Labels
type: question Request for information or clarification. Not an issue.

Comments

@gssakash-SxT
Copy link

gssakash-SxT commented May 10, 2023

I am trying to use the below import statement in my web application that runs NodeJS and uses the WebPack Module Bundler.
But I get an error which says Uncaught TypeError: Object prototype may only be an Object or null: undefined.

Steps to reproduce

import { BetaAnalyticsDataClient } from '@google-analytics/data';
const analyticsDataProvider = new BetaAnalyticsDataClient();

I got this far by resolving the errors which webpack gave me by following this.
But, I've never been able to figure out the above error.

It would be really helpful if I can know what mistake I am exactly making and hopefully resolve the problem. Thanks!

@sofisl sofisl added the type: question Request for information or clarification. Not an issue. label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants