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

Global CSS cannot be imported from within node_modules. #7170

Open
pldrouin opened this issue Sep 23, 2024 · 2 comments
Open

Global CSS cannot be imported from within node_modules. #7170

pldrouin opened this issue Sep 23, 2024 · 2 comments
Assignees
Labels
bug something broken P2 needed for current cycle

Comments

@pldrouin
Copy link

Hi,
I get the following error with 2.35.2 when I try building with npm run build. It seems to be related to #7139 and #7145. What do I need to change to fix this error?

Thanks!

▲ Next.js 14.2.11

✓ Linting and checking validity of types
Creating an optimized production build ...
(node:8736) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use node --trace-deprecation ... to show where the warning was created)
Failed to compile.

./node_modules/maplibre-gl/dist/maplibre-gl.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/plotly.js/src/registry.js

Import trace for requested module:
./node_modules/maplibre-gl/dist/maplibre-gl.css
./node_modules/plotly.js/src/registry.js
./node_modules/plotly.js/src/core.js
./node_modules/plotly.js/lib/core.js
./src/plotly-custom.js
./components/PlotlyChartDynamicLoad.js
./components/PlotlyChart.js

./node_modules/maplibre-gl/dist/maplibre-gl.css

@gvwilson gvwilson added bug something broken P2 needed for current cycle labels Sep 23, 2024
@archmoj
Copy link
Contributor

archmoj commented Sep 23, 2024

Which version of node and npm you are on?

@pldrouin
Copy link
Author

npm: 10.8.2
node: v20.17.0

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 needed for current cycle
Projects
None yet
Development

No branches or pull requests

4 participants