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

TypeError in NextJS: <<Container.extend is not a function>> #17

Open
Jawisr opened this issue Jan 23, 2025 · 1 comment
Open

TypeError in NextJS: <<Container.extend is not a function>> #17

Jawisr opened this issue Jan 23, 2025 · 1 comment

Comments

@Jawisr
Copy link

Jawisr commented Jan 23, 2025

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/@Mantine+core@7.16.1_@mantine[email protected]@19.0.0__@types[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 Jawisr changed the title TypeError in NextJS Container.extend is not a function TypeError in NextJS: <<Container.extend is not a function>> Jan 23, 2025
@Abhishek-S-Lal
Copy link
Contributor

Abhishek-S-Lal commented Jan 23, 2025

@Jawisr
In the theme.ts file, add "use client" as the first line and it will work as expected.

Image

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

2 participants