agentcooper / react-pdf-highlighter

Set of React components for PDF annotation

Home Page:https://agentcooper.github.io/react-pdf-highlighter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS Imported by a Dependency

linojon opened this issue · comments

Trying to use this package with Next.js. I'm dynamically loading to avoid SSR. But then get the following error:

error - ./node_modules/react-pdf-highlighter/build/style/AreaHighlight.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Location: node_modules\react-pdf-highlighter\build\components\AreaHighlight.js

The link they provide to https://nextjs.org/docs/messages/css-npm says:
Possible Ways to Fix It
Reach out to the maintainer and ask for them to publish a compiled version of their dependency.
Compiled dependencies do not have references to CSS files, or any other files that require bundler-specific integrations.

To be continued in #156.