TypeError in NextJS: <<Container.extend is not a function>>
Hi team, i have just copied the theme.ts into my project and passed to the MantineProvider component, first time I render the page i receive the following error in turbopack:
TypeError: {imported module [project]/nodemodules/.pnpm/@[email protected]_@[email protected]@19.0.0__@[email protected]@[email protected][email protected]/nodemodules/@mantine/core/esm/components/Container/Container.mjs [app-rsc] (ecmascript)}.Container.extend is not a function
[project]/app/styles/theme.ts [app-rsc] (ecmascript)
I tried commenting the Container object in the theme but the next component: Checkbox.extend throws the same error.
@Jawisr
In the theme.ts file, add "use client" as the first line and it will work as expected.