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

Next.js does not allow importing global CSS from node_modules #3

Open
azizyano opened this issue Jul 11, 2024 · 0 comments
Open

Next.js does not allow importing global CSS from node_modules #3

azizyano opened this issue Jul 11, 2024 · 0 comments

Comments

@azizyano
Copy link

Bug Report

Description

Next.js does not allow importing global CSS from node_modules, which causes an error when using reactjs-qr-code-reader.

Steps to Reproduce

  1. Install reactjs-qr-code-reader in a Next.js project.
  2. Import reactjs-qr-code-reader in a component.
  3. Attempt to run the Next.js application.

Error Message

Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm

What I've Tried

  1. Copying the CSS file to the local project and importing it manually.
  2. Custom Webpack configuration to handle CSS from node_modules.

Environment

  • Next.js version: 14.2.5
  • reactjs-qr-code-reader version: x.x.x

Additional Context

Any additional information that might help diagnose the problem.

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

1 participant