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

TypeError: Object.defineProperty called on non-object ( mediapipe/tasks-vision ) #1687

Closed
gsimone opened this issue Oct 16, 2023 · 5 comments · Fixed by #1688
Closed

TypeError: Object.defineProperty called on non-object ( mediapipe/tasks-vision ) #1687

gsimone opened this issue Oct 16, 2023 · 5 comments · Fixed by #1688
Labels
bug Something isn't working released

Comments

@gsimone
Copy link
Member

gsimone commented Oct 16, 2023

This is on a next.js project with

@react-three/drei 9.88.2
@react-three/fiber 8.14.5
three 0.157.0
next 13.5.2
three-stdlib 2.27.2

This is both a symptom of something wrong with three shaking and a problem with @mediapipe/tasks-vision, also see:

Screenshot of the error: Screenshot 2023-10-16 at 11 09 28
@gsimone gsimone added the bug Something isn't working label Oct 16, 2023
@CodyJasonBennett
Copy link
Member

CodyJasonBennett commented Oct 16, 2023

We're going to have to vendor that library and repackage it so it's safe for NPM. The linked issues are for Metro which doesn't understand Node ESM. We have documentation for that specifically: https://docs.pmnd.rs/react-three-fiber/getting-started/installation#react-native.

@CodyJasonBennett
Copy link
Member

IDK if this helps at all since Next is notoriously bad at dynamic or linked dependencies, but I have #1688 which should filter out the broken module.

@gsimone
Copy link
Member Author

gsimone commented Oct 16, 2023

You rock, I'll see if this helps and create a minimal repro if I can find some time

@CodyJasonBennett
Copy link
Member

What's bothering me is that we have E2E tests for CRA and Next from a snapshot tgz and they don't encounter this issue. If you find any preferences which are interactive, I'll be sure to add it to our coverage.

@github-actions
Copy link

🎉 This issue has been resolved in version 9.88.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants