I get the following compile error when i tried a to use the package in a NextJS project :
Failed to compile
./node_modules/react-web-media-player/es/components/Container.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-web-media-player/es/components/Container.js
This error occurred during the build process and can only be dismissed by fixing the error.
NextJS has this limitation and actually requires that global CSS imports are done in a special file (_app.tsx) or via directives in a special <Head>
component that can have a <link rel="stylesheet" ...>
(like rect-helmet
) in normal files.