Three js problem : Cannot read properties of undefined (reading 'x')

Hello,guys. I try to follow the blog from James Warner : Creating My Website’s 3D Header 1.0 in typescript. I 've met a problem in the volumetirc lighting part.Here is the blog link:
https://jmswrnr.com/blog/creating-my-websites-3d-header#volumetric-lighting
I find out when the application run ‘occlusionComposer.render()’ the problem will come : 'Cannot read properties of undefined(reading ‘x’).
I have to say the shader part is hard to debug, but I guess the problem isn’t from the shader.
Do you have a idea about this problem?

This kind of error suggests your code contains a mistkae, but seeing only the blog post and not your own code, I doubt we can help. I would recommend sharing a way for others to reproduce the problem to get help more quickly. Live demo’s are by far the best option, or just the code may also be enough.