Skip to content

[Bug]: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization in StatisticGroup #4507

@KHALED-gtf

Description

@KHALED-gtf

I'm encountering an error when using the StatisticGroup component in Semantic UI React. The error message is:

Cannot access 'WEBPACK_DEFAULT_EXPORT' before initialization
ReferenceError: Cannot access 'WEBPACK_DEFAULT_EXPORT' before initialization
at Module.default (http://localhost:3000/static/js/bundle.js:63553:42)
at ./node_modules/semantic-ui-react/dist/es/views/Statistic/Statistic.js (http://localhost:3000/static/js/bundle.js:63532:64)
at options.factory (http://localhost:3000/static/js/bundle.js:111723:31)
at webpack_require (http://localhost:3000/static/js/bundle.js:111175:32)
at fn (http://localhost:3000/static/js/bundle.js:111382:21)
at ./node_modules/semantic-ui-react/dist/es/views/Statistic/StatisticGroup.js (http://localhost:3000/static/js/bundle.js:63569:68)
at options.factory (http://localhost:3000/static/js/bundle.js:111723:31)
at webpack_require (http://localhost:3000/static/js/bundle.js:111175:32)
at fn (http://localhost:3000/static/js/bundle.js:111382:21)
at ./src/home/homeStats.js (http://localhost:3000/static/js/bundle.js:304:75)
This occurs when importing StatisticGroup in my project.

import { Component } from "react";
import {
StatisticValue,
StatisticLabel,
StatisticGroup,
Icon,
Image,
Statistic,
} from "semantic-ui-react";
export default class HomeStatistic extends Component {
render() {
return (
<StatisticGroup
// widths={3}
style={{
backgroundColor: "rgba(67, 53, 167, .7)",
textAlign: "center",
marginTop: "3rem",
}}
>
<Statistic size="big" style={{ textAlign: "center" }}>

<StatisticValue style={{ color: "#FFD700" }}>42
<StatisticLabel style={{ color: "#FFD700" }}>
Visitors Number :



);
}
}
Expected Behavior:
The StatisticGroup component should render without throwing errors.
Actual Behavior:
The application crashes with the following error:
Cannot access 'WEBPACK_DEFAULT_EXPORT' before initialization
Version Info:
Semantic UI React Version: 2.1.5
React Version: 18.0.0
Node.js Version: v20.12.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions