sahilverma2209 / react-wheelpicker

A simple React component which brings wheel-picker to the web!
23 stars 13 forks source link

Global CSS cannot be imported from within node_modules. Next.js #34

Open Abdulraheem987 opened 1 year ago

Abdulraheem987 commented 1 year ago

./node_modules/react-wheelpicker/dist/index.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules\react-wheelpicker\dist\index.js

In next js not proper work this library. https://nextjs.org/docs/messages/css-npm

ryancwalsh commented 1 month ago

I just got this same problem.

I think I fixed it via a workaround of adding transpilePackages: ['react-wheelpicker'], to my nextConfig object in next.config.mjs.

https://github.com/akursat/react-leaflet-cluster/issues/22#issuecomment-1415826560

But now I'm getting this error:

./node_modules/react-wheelpicker/dist/index.js:7:23
Module not found: Can't resolve 'babel-runtime/core-js/object/get-prototype-of'

I think yarn add babel-runtime fixed that.