Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KHALED-gtf opened this issue Dec 19, 2024 · 1 comment

Comments

@KHALED-gtf
Copy link

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

Copy link

welcome bot commented Dec 19, 2024

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant