pmndrs / detect-gpu

Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications.
MIT License
1.01k stars 55 forks source link

Crash in an old browser. (iPad Mini 1 Safari 9) #86

Open hmmhmmhm opened 2 years ago

hmmhmmhm commented 2 years ago

The result of this module seems to be the ES6+.

After using this module, I confirmed that it was inaccessible from a device using an old browser. An error occurs because the old browser does not recognize the const keyword.

I tried to convert the module to ES5 arbitrarily, but the following error occurs as the result value of next-transpile-modules + babel. TypeError: I is not a function

div-cowboy commented 2 years ago

Also having this issue, please advise 🙏

alexkowel commented 2 years ago

I'm not a developer, but I believe this device is quite outdated. It has specs similar to iPad 2 and surely won't render anything more complex than a bunch of simple textured cubes or so...

kouak commented 2 years ago

I believe I'm also having this issue on production builds created by create-react-app.

This does not happen in development mode.

I set up a small repro repo here: https://github.com/kouak/detect-gpu-repro

This was reproduced using Chrome 97 and Firefox 96 on linux.

drenmullafetahu commented 2 years ago

I have the lastest Macbook pro M1 and having

Unhandled Rejection (TypeError): e is not a function

Screenshot 2022-02-03 at 8 36 12 PM

Any fix for this ? I really wanted to use this library .

kouak commented 2 years ago

@drenmullafetahu That's the same stack trace I got with create-react-app v5 (which uses webpack 5).

Solved it by moving to vite.

eric-taix commented 2 years ago

@drenmullafetahu That's the same stack trace I got with create-react-app v5 (which uses webpack 5).

Solved it by moving to vite.

@kouak Can you explain what exactly you did (with some code) to solve this issue or even better open a PR and add a link to this PR in a comment of this issue? We're facing the same issue as #89 which seems to be the same as this one. Many people are currently encountering it and any tips / code would be very helpful ❤️

kouak commented 2 years ago

If I remember correctly, I just moved the project to vite instead of CRA.

I haven't had time to investigate further though.

CodyJasonBennett commented 2 years ago

We just published a fix for https://github.com/pmndrs/detect-gpu/issues/89 with #94, which indicated an issue with this project's build step.

Does anyone have a quick reproduction to clear #96?

paulrehkugler commented 1 year ago

cc @jansedivy

xiaoxiao5 commented 1 year ago

image vue@cli 5, how to solve…