Skip to content

Uncaught TypeError: Cannot set property customDepthMaterial of #<Text> which has only a getter #2403

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

Open
xiaofei159 opened this issue Apr 2, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@xiaofei159
Copy link

xiaofei159 commented Apr 2, 2025

Reporting errors with Text in version 10.0.0 and later Uncaught TypeError: Cannot set property customDepthMaterial of # which has only a getter
Here is the example code:
<Text> Threejs Text </Text>

@xiaofei159 xiaofei159 added the bug Something isn't working label Apr 2, 2025
@thefreymaster
Copy link

Getting this same error on v9.122.0

@CodyJasonBennett
Copy link
Member

Do you have a shadow map configured?

@xiaofei159
Copy link
Author

Do you have a shadow map configured?

I didn't do any configuration. I'm still in the initial learning stage. I used it directly after introducing Text.

@kdnhyk
Copy link

kdnhyk commented Apr 7, 2025

In my case, although I’m not sure why, removing the vite-plugin-glsl plugin solved the issue. (using nx + pnpm environment)

@curiousMousey
Copy link

This seems to be a very large issue atm, adding Text/Text3D breaks any scene when used with Nextjs 15
There seem to be various variants of errors you can see after introducing Text, not necessarily customDepthMap

@Andrej235
Copy link

Using drei "10.0.6", fiber "9.1.2" and threejs 175, I get the same error as above. But after downgrading to threejs 174 the error disappeared. I'm also on Nextjs 15

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

No branches or pull requests

6 participants