-
Notifications
You must be signed in to change notification settings - Fork 64
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
r.setValue is not a function error in production #9
Comments
Having the same problem. Have you find a solution to get around this? |
@dwqdaiwenqi any idea how to fix this? Thanks so much! |
ok I fixed this. I had to compile this locally with a few changes to the imports. but it works in prod build now. |
@Ailanz what changes?? |
@UltimateForm I dont remember exactly as I incorporated it into my own project. But just make a fork and build it locally and fix any errors that comes up. |
@Ailanz do you remember having this issue? seems to be related to global variable of THREE missing, however setting the window.THREE = THREE did not fix it |
yes. Don't have my code with me at the moment but Three is the web gl 3d framework. Take a look at their examples. |
@Ailanz I know what Three is and I've taken a look a their examples, the issue is that their example modules assume the existence of the Three as a global variable and I cannot seem to be able make it work. I can import the modules separately, like
with either global or window, and no matter which approach I taken (i've experimented a few), I always end up on the same error:
I have taken a look at alternatives to see what they've done but the code is usually not all present or lacking support for what I want (GLTF), it'd be a great help if you could remember how you fixed any of these issues |
Anyone make on progress on this with more specifics? Really need a fix. |
Same problem here. Works fine locally, but not when hosted online. |
Ok, I managed to solved it using the method @Ailanz mentioned.
|
It should be pretty straight forward. As @sonicsmith mentioned, just make sure you have all the dependencies needed. Also one thing I noticed is that the style props does not propogate all the way through, it only forwards a set of style keys which can be problematic for responsive web (webgl canvas size is not responsive here). So make sure to extend it and pass through the style props if needed. |
Importing the examples throgh the official modules was also one of the approaches I tried, but it got me to the same error above, I will try again later |
Used your fix @sonicsmith but still hitting the same issue. Does anyone have an actual patch to provide? Thanks |
Hello. Has anyone solved this problem? |
This component renders fine when I'm developing and viewing with npm start, but after running npm run build and uploading the build to my production server, I just get this error in console:
repeatedly, and the object is never rendered.
Any idea what could be causing this?
The text was updated successfully, but these errors were encountered: