React components throw error when used in NextJS 14+
deckchairlabs opened this issue · comments
The following error occurs during development, and causes 500 errors when deployed to production. I believe the generated React component wrappers just need a use client
directive
⨯ ../node_modules/.pnpm/media-chrome@1.6.0/node_modules/media-chrome/dist/media-chrome-button.js (80:43) @ HTMLElement
⨯ Class extends value undefined is not a constructor or null
This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component
This seems to no longer be the case with latest NextJS 14.0.4