-
Notifications
You must be signed in to change notification settings - Fork 3
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
html5-device-mockups not found in nextjs #5
Comments
@zaaakher Thanks for pointing out this issue! I think the main issue is that the library breaks when NextJS attempt to do server-side rendering because the library depends on being able to read values from the stylesheet to size the component. I'll look into the issue this weekend! |
@zaaakher Try upgrading to |
It seems this line is causing an error in Nextjs when I try to import the library
https://github.com/kajchang/react-device-mockups/blob/7b976cb1a3c8ff3a550f8fafffd52f54cb818811/src/Device.tsx#L51-L53
My
package.json
And at first I used it regularly in
/pages/index.js
of my projectAnd then based on this answer, I tried using this approach by importing the css in
pages/_apps.js
The text was updated successfully, but these errors were encountered: