-
Notifications
You must be signed in to change notification settings - Fork 79
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
Next.js and Pannellum-react: "Global CSS cannot be imported from within node_modules." error #86
Comments
Was trying this package out and hit same issue here |
I experienced the same today. |
This is the reason. They have RFC for fixing it as far as I understood |
This is working on one of our production env. And I could not find the error. With React 17 and Nextjs 12. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I'm receiving the following error after installing and attempting to import the component in a Next.js 11 environment.
import { Pannellum } from "pannellum-react";
error - ./node_modules/pannellum-react/es/pannellum/css/pannellum.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/pannellum-react/es/elements/Pannellum.js
Next.js official documentation on this issue (https://nextjs.org/docs/messages/css-npm) doesn't have a good solution to this other than to refactor things so there's no CSS imported from node_modules or to "make a compiled version of the dependency."
That being said, I'm wondering if anyone has any insight on a workaround?
I found someone else with the same issue too: https://stackoverflow.com/questions/66664698/i-got-this-error-in-next-js-while-implement-pannellum-react-to-make-3d-images-g
Tracking URL here in case that thread ends up with valuable information.
Any insight much appreciated, and thanks for making the React version in the first place!
. . .
Some more info:
And screenshot of errors in terminal:
The text was updated successfully, but these errors were encountered: