Bug: detect-gpu crashes on SSR/SSG
See original GitHub issueProblem
detect-gpu
will crash on SSR/SSG.
ReferenceError: window is not defined
at /hoge/hoge/node_modules/detect-gpu/dist/detect-gpu.umd.js:1:2591
at /hoge/hoge/node_modules/detect-gpu/dist/detect-gpu.umd.js:1:131
I know detect-gpu
depends on window
object, but getGPUTier
returns early without window
object, so I think this ReferenceError is unexpected behavior.
Early Return https://github.com/TimvanScherpenzeel/detect-gpu/blob/23b80f1d0c02417804c4913ef0702524a56469b7/src/index.ts#L69-L75
I think this line is the cause of this ReferenceError.
Reproduce
node
and
const { getGPUTier } = require("detect-gpu");
Notes
Can I fix this issue?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Bug: detect-gpu crashes on SSR/SSG · Issue #52 · pmndrs/detect ...
I know detect-gpu depends on window object, but getGPUTier returns early without window object, so I think this ReferenceError is unexpected behavior.
Read more >My PS Vita's GPU Crashed!? How I Fixed It! - YouTube
Hi guys, Tech James here,These are the 2 methods I found for fixing the PS Vita GPU crash error !This video is for...
Read more >Manufacturers respond to GeForce RTX 3080/3090 crash to ...
NVIDIA GeForce RTX 3080/3090 graphics cards face Crash To Desktop (CTD) problems. The ongoing problems with GeForce RTX 30 series launch are reaching...
Read more >[PC] How to Resolve GPU Crashes in Darktide
Using a G-Sync Ultrawide Monitor? · Right-click the desktop and select the 'NVIDIA Control Panel' · Select 'Help' · Select 'Debug Mode' ·...
Read more >2070 Super - Constant BSOD crashes | NVIDIA GeForce Forums
This appears to be a typical software driver bug and is not likely to be caused by a hardware problem. The crash took...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Shinyaigeek thanks for confirming, I had little time lately to look at that MR in detail - hope to get to it soon!
Thanks!! version 3.0.0 perfectly works!!