react-nice-avatar icon indicating copy to clipboard operation
react-nice-avatar copied to clipboard

TypeError: Super expression must either be null or a function

Open 18601673727 opened this issue 1 year ago • 2 comments

Using with next.js v14 with app router, in server component do:

<div className="flex text-xs md:text-md gap-4">
  <Avatar className="flex-none w-10 h-10" {...genConfig(reply.author.id)} />
  <div>{reply.author.name}</div>
</div>

got error:

Server Error

TypeError: Super expression must either be null or a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
_inherits
node_modules\.pnpm\@[email protected]\node_modules\@babel\runtime\helpers\inherits.js (4:1)
eval
node_modules\.pnpm\[email protected][email protected]\node_modules\react-nice-avatar\dist\index.esm.js (1:49315)
eval
node_modules\.pnpm\[email protected][email protected]\node_modules\react-nice-avatar\dist\index.esm.js (1:50773)
(rsc)/./node_modules/.pnpm/[email protected][email protected]/node_modules/react-nice-avatar/dist/index.esm.js

Maybe need to look at this code? https://github.com/dapi-labs/react-nice-avatar/blob/e43d9e47d87d5dcf1337eca64fef7e51f0a5409c/src/index.tsx#L19

18601673727 avatar Apr 25 '24 18:04 18601673727

Facing the same issue, needed to make the component client side, which is not ideal.

eulerkochy avatar Jul 15 '24 15:07 eulerkochy

I'm facing the same issue, were you able to find a solution?

JamilFilho avatar Sep 30 '24 11:09 JamilFilho