react-paginate icon indicating copy to clipboard operation
react-paginate copied to clipboard

Rendering Error

Open josekenya opened this issue 1 year ago • 2 comments

I'm using this package in a framework and I get this error.

Screenshot 2023-09-12 at 19-18-49 Screenshot

josekenya avatar Sep 12 '23 16:09 josekenya

Apparently this package does not feel good when used in ESM project. Worked just fine in Remix project + cjs mode. After switching to esm it started to show the same error as on your screenshot.

atoi avatar Oct 11 '23 14:10 atoi

I was stuck on the same issue and finally got it to work by following these instructions: https://vike.dev/broken-npm-package#react-invalid-component

The first option ('local workaround') did not work for me, but after installing and configuring the vite-plugin-cjs-interop plugin the pagination component started working.

Not sure if there are alternative ways if you're not using Vite.

SapuSeven avatar May 29 '24 20:05 SapuSeven