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

Module Import fails in Nuxt3 --- ar-threex-location-only.js --- Cannot read properties of undefined (reading 'THREE') #588

Open
dennishelbig opened this issue Dec 7, 2023 · 3 comments

Comments

@dennishelbig
Copy link

dennishelbig commented Dec 7, 2023

Do you want to request a feature or report a bug?
It's a bug

What is the current behavior?
Was trying to replicate this example:
https://ar-js-org.github.io/AR.js-Docs/location-based-three/part1/

Import fails when importing 'three.js' and '~/node_modules/@ar-js-org/ar.js/three.js/build/ar-threex-location-only.js'

If the current behavior is a bug, please provide the steps to reproduce.
https://codesandbox.io/p/devbox/ar-js-forked-fmnfnh?file=%2Fapp.vue%3A7%2C73-7%2C99
See Console -->
Cannot read properties of undefined (reading 'THREE')

Please mention other relevant information such as the browser version, Operating System and Device Name

Mac OSX 14.1
Chromium, Safari
Nuxt 3
@ar-js-org/ar.js Module from npm

What is the expected behavior?
Module import should run through without errors.

If this is a feature request, what is motivation or use case for changing the behavior?

@roiLeo
Copy link

roiLeo commented Dec 8, 2023

Have you tried to setup project using Tresjs?

@dennishelbig
Copy link
Author

No, I didn't.

I kind of figured out that while time of writing the issue, I tried three v0.159 (current latest version) and arjs v3.4.5, which are not compatible with each other. After seeing the article I used to build upon was written around a year ago, I took a three.js version from that time. v0.147 works with arjs v3.4.5.

Thanks the hinting tresjs, wasn't aware of it, I'll take a look at it.

@nickw1
Copy link
Collaborator

nickw1 commented Sep 11, 2024

@dennishelbig thanks for that. Sorry for late reply but do you have any specific console errors that occur when using three 0.159 and arjs 3.4.5? That would help find the incompatibilities. Thanks.

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

No branches or pull requests

3 participants