Change the color of a face of a sphere geometry on hover

Hello everyone I am a beginner in Three js what I would like to do is that when we fly over the sphere a cube is added in my scene and when the sphere is in contact with the cube, that all the faces that are inside my cube change color however I have the following error someone have an idea why please

Here is my code on it

And here is the type of example I would like to have
https://hofk.de/main/discourse.threejs/2019/SelectFacesWithinRadius/SelectFacesWithinRadius.html