You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The npm run build command throws an error when a next js application is built that uses the card group component. The error message is ReferenceError: Cannot access '{random letter(s)}' before initialization.
ReferenceError: Cannot access 'ni' before initialization
at 4880 (CardGroupTest\nextjs-blog.next\server\app\page.js:12:43473)
at Object.t [as require] (CardGroupTest\nextjs-blog.next\server\webpack-runtime.js:1:127)
at require (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:96668
at F._fromJSON (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:97106)
at JSON.parse ()
at O (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94083)
at t (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:100582)
at runNextTicks (node:internal/process/task_queues:60:5)
✓ Generating static pages (5/5)`
I was able to work around this issue by manually specifying both the Card import and the CardGroup import on separate lines in all places where I had used either a Card or CardGroup.
"use client";
import 'semantic-ui-css/semantic.min.css'
import { CardGroup } from "semantic-ui-react";
import { Card } from "semantic-ui-react";
export default function Home() {
return (
<CardGroup>
</CardGroup>
);
}
Bug Report
The
npm run build
command throws an error when a next js application is built that uses thecard group
component. The error message isReferenceError: Cannot access '{random letter(s)}' before initialization
.Steps
page.tsx
Expected Result
The app to successfully build.
Actual Result
`Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: Cannot access 'ni' before initialization
at 4880 (CardGroupTest\nextjs-blog.next\server\app\page.js:12:43473)
at Object.t [as require] (CardGroupTest\nextjs-blog.next\server\webpack-runtime.js:1:127)
at require (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:96668
at F._fromJSON (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:97106)
at JSON.parse ()
at O (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94083)
at t (CardGroupTest\nextjs-blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:100582)
at runNextTicks (node:internal/process/task_queues:60:5)
✓ Generating static pages (5/5)`
Version
semantic-ui-css: ^2.5.0,
semantic-ui-react: ^2.1.5
The text was updated successfully, but these errors were encountered: