Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) TypeError: M is not a function #89

Closed
szehao opened this issue Mar 14, 2022 · 9 comments · Fixed by #94 · May be fixed by #96
Closed

Uncaught (in promise) TypeError: M is not a function #89

szehao opened this issue Mar 14, 2022 · 9 comments · Fixed by #94 · May be fixed by #96

Comments

@szehao
Copy link

szehao commented Mar 14, 2022

Works fine locally, but not on production.

On create-react-app v5.0.0

Other users having same issue on separate issue : #86 (comment)

image

@danhollick
Copy link

danhollick commented Apr 3, 2022

Having this same issue
Screenshot 2022-04-03 at 19 19 39

Happening on all browsers across multiple devices.
Another one here:
#88

My packages:

"gatsby": "4.7.2",
"webpack": "^5.69.1"
"detect-gpu": "^4.0.16"

or with useDetectGPU

"@react-three/drei": "8.20.2"

@TimvanScherpenzeel is there something we can do to help debug this issue? I'm not even sure where to start

@danhollick
Copy link

danhollick commented Apr 4, 2022

Have tracked down this breaking change to version 4.0.0.
3.1.3 works as expected but doesn't report apple M1s correctly.

The fact that the demo works fine and it works on the dev server indicates that there is something happening in the bundling process between webpack/babel.

@puckey It looks like you did quite a lot of work on that release - do you have any clue what might be causing this?

@alejandrozeppelinlabs
Copy link

Hey, I am having the same problem! Is there any solution for this? I tried version 3.1.3 but is not working correctly on apple devices.

@SebasScript
Copy link

same issue here with new version of create react app that uses webpack 5

@ktingvoar
Copy link

ktingvoar commented Jun 24, 2022

This issue has been blocking me for a while now too. Did some cursory hunting, and removing the terser plugin from the rollup config seemed to fix the issue in our environment. Is it necessary?

gabriellebaudy pushed a commit to gabriellebaudy/detect-gpu-fixed that referenced this issue Jul 5, 2022
gabriellebaudy pushed a commit to gabriellebaudy/detect-gpu-fixed that referenced this issue Jul 5, 2022
@eric-taix
Copy link

I know that maintaning opensource project is time consuming, but do you have any plan to fix this issue?

For now we're unable to build a production version which is annoying for our business. I'm pretty sure that many people using this library would like to help.

@puckey
Copy link
Collaborator

puckey commented Jul 6, 2022

@eric-taix Right above your +1 comment someone seems to be pushing commits purporting to fix this issue. How about asking them to open a PR or review the commits yourself and open a PR?

@eric-taix
Copy link

@eric-taix Right above your +1 comment someone seems to be pushing commits purporting to fix this issue. How about asking them to open a PR or review the commits yourself and open a PR?

This is one of my coworker who's trying to fix this issue (typically by removing terser as suggested here). And of course if we fix it, we'll open a PR ;-) For now, this is far from being solved.

If a maintainer could give us some advice(s) / idea(s) it would be probably more efficient.

@gabriellebaudy
Copy link
Contributor

Hello,

I found and submitted a fix for this issue, you can have a look here.

As it's a small but important fix we might expect to have it packaged soon I hope!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants