TuckerMassad / react-animated-counter

React Animated Counter Component
MIT License
66 stars 12 forks source link

Compatibility with NextJS #1

Closed skords closed 1 year ago

skords commented 1 year ago

NextJS throws the following error:


Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules\react-animated-counter\dist\index.js```
TuckerMassad commented 1 year ago

Thanks for the note on this @skords. I fixed up this issue with the 1.2.5 release, please update to the latest version and let me know if you are still running into issues! 😄

hlarrainq commented 10 months ago

Hi! I still have this issue on the last version:( How can i fix it?

TuckerMassad commented 10 months ago

Hi @hlarrainq, what version of nextjs are you using and what version of react-animated-counter are you currently using? In a local next app I have running, I am not running into the issue. Any additional steps to reproduce would be great!

hlarrainq commented 10 months ago

I am using nextJS 13.0.5 with react-animated-counter 1.7.6. I get this error:

./node_modules/react-animated-counter/dist/esm/styles.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules\react-animated-counter\dist\esm\AnimatedCounter.js

Also i tried with nextJS 13.4.x with react-animated-counter 1.2.5. Same result.

This is a shame becasuse your library seems very smooth, i tried on another project without next and it looks amazing.