#Please help me Nextjs fans, been getting this error in production but runs smoothly in development #9877
olamide-thinker
started this conversation in
General
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
▲ Next.js 14.2.3
Creating an optimized production build ...
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (1/37) [= ]ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/auth/forgot-password". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/auth/signin". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/auth/signup". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/portal/apps/gradeCompute". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/portal/apps/gradeInsight". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/portal/apps/gradeInsight/analytics". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/portal/apps/paymentTank". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/portal/apps/gradeInsight/psychomotor". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
Error occurred prerendering page "/portal/apps/gradeInsight/comments". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974)
Generating static pages (9/37) [== ]ReferenceError: window is not defined
at 13097 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:26378)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 39637 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:28166)
at t (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at 18408 (C:\Users\Ola Ola\Desktop\educenty-test.next\server\chunks\6279.js:1:3792)
at Object.t [as require] (C:\Users\Ola Ola\Desktop\educenty-test.next\server\webpack-runtime.js:1:128)
at require (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:16:18365)
at I (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:94362)
at C (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:92913)
at rP (C:\Users\Ola Ola\Desktop\educenty-test\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:33974) {
digest: '3868951986'
}
an so on but same pattern all of my files
Reproduction
"use client"
import React, { useRef } from "react";
import { ThemeProvider } from "@/components/theme-provider";
import type { Metadata } from "next";
import { Poppins } from "next/font/google";
import "./globals.css";
// import { QueryClient, QueryClientProvider } from "react-query";
import { Toaster } from "@/components/ui/toaster";
import { Provider } from "react-redux";
import { store } from "@/state/store";
// import { store, AppStore } from "@/state/store";
// import { IsClientCtxProvider } from "./is-client-ctx";
import path from "path";
const poppinsFont = Poppins({
subsets: ["latin"],
weight: ["100", "300", "400", "500", "600", "700"],
});
const styles: React.CSSProperties = {
fontFamily: poppinsFont as unknown as string,
};
// export const metadata: Metadata = {
// title: 'Educenty ',
// description: 'Generated by create next app',
// }
type RootLayoutProps = {
children: React.ReactNode;
};
export default function RootLayout({ children }: RootLayoutProps) {
// const storeRef = useRef<AppStore | null>(null);
// if (!storeRef.current) {
// storeRef.current = store();
// }
// const queryClient = new QueryClient();
return (
);
}
Expected behavior
"use client"
import React, { useRef } from "react";
import { ThemeProvider } from "@/components/theme-provider";
import type { Metadata } from "next";
import { Poppins } from "next/font/google";
import "./globals.css";
import { Toaster } from "@/components/ui/toaster";
import { Provider } from "react-redux";
import { store } from "@/state/store";
import path from "path";
const poppinsFont = Poppins({
subsets: ["latin"],
weight: ["100", "300", "400", "500", "600", "700"],
});
const styles: React.CSSProperties = {
fontFamily: poppinsFont as unknown as string,
};
type RootLayoutProps = {
children: React.ReactNode;
};
export default function RootLayout({ children }: RootLayoutProps) {
return (
);
}
Full
tauri info
outputStack trace
No response
Additional context
i am currently not using window in any component, and i added use client to all the files that might any client feature. nothing about the error currently make sense to me.
Beta Was this translation helpful? Give feedback.
All reactions