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

Avoid NextJS module import error #575

Open
MikeWillisFC opened this issue Oct 13, 2021 · 0 comments
Open

Avoid NextJS module import error #575

MikeWillisFC opened this issue Oct 13, 2021 · 0 comments

Comments

@MikeWillisFC
Copy link

This issue is a:

  • Question / support request

nwb v0.25.2
node v14.17.0
npm v6.14.13
react v17.0.2

I'm using nwb to build a React component that I've uploaded to a private github repo. I've included the component on regular React projects with no problem. However, NextJS is giving me an error because I'm using CSS modules in the component:

https://nextjs.org/docs/messages/css-modules-npm

NextJS seems to think that I'm using the source files rather than the built ones, but that's not correct - the folder for the component in my /node_modules/ folder contains the /lib/ folder with the built files (but they are using module imports).

How can I build the component in a way that satisfies NextJS?

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