Problems with NextJS SDK

@Piotrek

Your SDK does not work - it fails with:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

How to reproduce:

  1. npx create-next-app@latest --ts
  2. npm install @piwikpro/next-piwik-pro
  3. replace contents of _app.tsx with the provided content below
  4. npm run dev

`
import PiwikProProvider from “@piwikpro/next-piwik-pro”;
import { AppProps } from “next/app”;

function App({ Component, pageProps }: AppProps) {
return (
<>

<Component {…pageProps} />

</>
);
}

export default App;
`

I wish you had a public repo for the lib.

@matthiasbruns we will try to reproduce your issue and get back with feedback.

We are also working on open-sourcing the library and I’ll share a link to the repository once it’s public.

Experiencing the same issue. Unable to proceed with Piwik PRO implementation using the SDK.

@matthiasbruns @oalsing

We released version 1.0.4 which should fix this issue, could you check again?
We also added some relevant information to the README here: https://www.npmjs.com/package/@piwikpro/next-piwik-pro#basic-setup

Our Next library is now also open-source. The repository is available here: GitHub - PiwikPRO/next-piwik-pro: Library for implementing Piwik PRO in Next.js web applications