-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
NextJS vanilla extract: Document not defined #4922
Comments
The issue, as you pointed out, is with Vanilla Extract, not Mantine, you can track the progress in Vanilla Extract repository. The fix for this issue cannot be implemented on Mantine side. |
For those who are still finding this issue, I have found I can get around it by adding the Next.JS "app directory" to my project - even if I don't then use it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What package has an issue
@mantine/vanilla-extract
Describe the bug
When using mantine in combination with NextJS (pages) and vanilla extract, the following error is throwing:
./src/styles/Demo.css.js NonErrorEmittedError: (Emitted value instead of an instance of Error) ReferenceError: document is not defined
Similar (or the same??) issue is also described here: vanilla-extract-css/vanilla-extract#1043 (comment)
Reproducing the issue is possible by running the server and opening the start page.
What version of @mantine/* packages do you have in package.json? (Note that all @mantine/* packages must have the same version in order to work correctly)
7.1.0
If possible, please include a link to a codesandbox with the reproduced problem
https:/BengtHagemeister/mantine-next-vanilla-extract-document-bug
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Possible fix
No response
The text was updated successfully, but these errors were encountered: