Skip to content

Not working with next.js 13 server components #4433

@rsodre

Description

@rsodre

Bug Report

Steps

Install clean next.js app, semantic-ui-react, using the new App Router
Add a <Container> or <Button> to the main page
npm run dev

Expected Result

The page should load with the semantic-ui components

Actual Result

The page will not work, displaying the error below
As a workaround, adding 'use client' to the top of the page makes it work
But it disables Server Component features.
https://nextjs.org/docs/getting-started/react-essentials#server-components

Unhandled Runtime Error
Error: Cannot read properties of undefined (reading 'prototype')

Call Stack
prototype
node_modules/@babel/runtime/helpers/inheritsLoose.js (3:48)
ModernAutoControlledComponent
node_modules/semantic-ui-react/dist/commonjs/lib/ModernAutoControlledComponent.js (80:31)
_react
node_modules/semantic-ui-react/dist/commonjs/lib/ModernAutoControlledComponent.js (204:2)
(rsc)/./node_modules/semantic-ui-react/dist/commonjs/lib/ModernAutoControlledComponent.js
/Users/roger/Dev/Blockchain/fDm/hypercartridge/.next/server/app/page.js (3990:1)

Version

"dependencies": {
    "next": "13.4.11",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "sass": "^1.64.0",
    "semantic-ui-css": "^2.5.0",
    "semantic-ui-react": "3.0.0-beta.0"
  }

Testcase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions