Next.js Discord

Discord Forum

Module not found: Can't resolve './style.css'

Unanswered
Golden northern bumble bee posted this in #help-forum
Open in Discord
Avatar
Golden northern bumble beeOP
I have a package that distributes css files along with js.
E.g footer.js + footer.css
I have transpilePackages: ['mypackage'], set in next.config.js
However, when I build the project it leads to error like:

> next build --no-lint

 ⚠ Linting is disabled
 ✓ Checking validity of types    
Failed to compile.

./node_modules/mypackage/dist/components/footer.js
Module not found: Can't resolve './footer.css'


Any ideas?

3 Replies

Avatar
Golden northern bumble beeOP
Asked there as well
Avatar
Golden northern bumble beeOP
Any ideas?