utsuboco / r3f-perf

Easily monitor your ThreeJS performances.
https://codesandbox.io/s/perlin-cubes-r3f-perf-wtp9t?file=/src/App.js
MIT License
573 stars 21 forks source link

Error on Next.js 14.1.0 - Window is not defined #50

Closed lighthaus205 closed 3 months ago

lighthaus205 commented 4 months ago

I just updated to Next.js v14.1.0 and it is breaking r3-perf. I am getting the error ReferenceError: window is not defined

Before, I've been using Next.js v14.0.4 without any issue with r3-perf.

Is this a known issue and any suggestion for fixing it?

GraphicSynesthesia commented 4 months ago

Hi, I can confirm the issue: I'm getting the same error on a new project with Next.js v14.1.0. I created another App with Next.js v14.0.4 and on this one r3f-perf works

Aditya-ranjan-16 commented 4 months ago

Yes getting the same error on Next v14.1.0

alvarindev commented 4 months ago

Confirming that I'm having same error in v14.1.0

[Error] ReferenceError: Can't find variable: window — b20cd203-3b98-411e-a7d2-0a2a2cfba575:116
    registerModule (87857671-b895-4b56-8a1b-e94764c790ef:52)
    (anonymous function) (87857671-b895-4b56-8a1b-e94764c790ef:23)
    map
    registerModule (87857671-b895-4b56-8a1b-e94764c790ef:21)
    (anonymous function) (87857671-b895-4b56-8a1b-e94764c790ef:23)
    map
    registerModule (87857671-b895-4b56-8a1b-e94764c790ef:21)
    (anonymous function) (87857671-b895-4b56-8a1b-e94764c790ef:23)
    map
    registerModule (87857671-b895-4b56-8a1b-e94764c790ef:21)
    (anonymous function) (87857671-b895-4b56-8a1b-e94764c790ef:118)
caiwy84 commented 4 months ago

It's a nextjs bug. I confirm it's gone when you update to a higher version.

RenaudRohlinger commented 4 months ago

The issue was on Next.js 14.1.0 and should be fixed with this PR in 14.1.1: https://github.com/vercel/next.js/pull/62051

Is the issue still happening with 14.1.1?

tobiasalthoff commented 3 months ago

The issue was on Next.js 14.1.0 and should be fixed with this PR in 14.1.1: vercel/next.js#62051

Is the issue still happening with 14.1.1?

Works with Nextjs 14.1.4!