Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

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

Open KHALED-gtf opened this issue 11 months ago • 1 comments

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" }}> <Image src="https://img.icons8.com/?size=300&id=9918&format=png&color=FFD700" size="small" centered /> <StatisticValue style={{ color: "#FFD700" }}>42</StatisticValue> <StatisticLabel style={{ color: "#FFD700" }}> Visitors Number : </StatisticLabel> </Statistic> </StatisticGroup> ); } } 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

KHALED-gtf avatar Dec 19 '24 08:12 KHALED-gtf

👋 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.

welcome[bot] avatar Dec 19 '24 08:12 welcome[bot]