three.js: cube with text on each surface

my goal is to create a cube with text on each surface.

I succeeded with a cube and text on one surface enter image description here

I found a nice example for text on each surface here: https://hofk.de/main/discourse.threejs/2020/DodecahedronCanvasTexture/DodecahedronCanvasTexture.html
enter image description here

But when I try to adopt this example I fail with enter image description here

Can anyone please help me what I’m doing wrong? You can see my broken try here: https://github.com/StephanPraetsch/react-three/blob/82995143844a768d6ccb10771f25d22713b37a48/src/components/Dodecahedron/Dodecahedron.tsx

there was an issue while adopting the example: the onBeforeCompile has been moved and it doesn’t work anymore. I don’t know if that is the crucial part.