It looks like the repo you linked to hasn’t been updated since 2017 and probably no longer works with the latest versions of Three.js
I know @manthrax worked on an update to work with more recent versions of Three.js Have you taken a look at his updated version? https://github.com/manthrax/THREE-CSGMesh