-
Notifications
You must be signed in to change notification settings - Fork 2
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
TypeError: _piwikpro_react_piwik_pro__WEBPACK_IMPORTED_MODULE_9___default(...).initialize is not a function #11
Comments
Hi, thanks for the notification. We tried to reproduce the problem, but with the standard react configuration the problem does not seem to occur. Would you be willing to show us how you build your application? Maybe some minimal version of the webpack configuration file? At the same time, I would like to inform you that we have released a new library to help integrate our product with NextJS applications. https://www.npmjs.com/package/@piwikpro/next-piwik-pro |
I have the same problem when trying to use react-piwik-pro with next.js , so I tried using next-piwik-pro. The repo is not open to file a bug report, that's why I am doing this here now Your SDK does not work - it fails with:
How to reproduce:
import PiwikProProvider from "@piwikpro/next-piwik-pro";
import { AppProps } from "next/app";
function App({ Component, pageProps }: AppProps) {
return (
<>
<PiwikProProvider accountName="accountName" containerId="43e4bca4-e220-43df-acfc-40fef7e25105">
<Component {...pageProps} />
</PiwikProProvider>
</>
);
}
export default App; I wish you had a public repo for the lib. |
@matthiasbruns Same here, also tried the next-piwik-pro package and got the same "Element type is invalid" error... |
Facing the same errors for both |
Well. Drop Piwik. That's what I did. 28days and no response 🤣 |
The repository has been made public. Link Could you try the solution we wrote about in the README of the next-piwik-pro library? I have verified that it solves your problem, however I would like confirmation from you. |
@danieltwork it helped, thanks! |
Hello! Somehow I get the webpack error even though it has been working for a few weeks now. I didn't changed something (neither webpack version, react-piwik package version or the relevant code parts).
The relevant code follows the documentation, is initialized in the _app.tsx and looks like that:
I am using React 17.0.2 with Next.js 12.2.5. I already tried different ways of importing the module, but that didn't work out.
Does anybody know what the issue is here?
The text was updated successfully, but these errors were encountered: