Thank you for clarifying.
I am now able to reproduce the problem. The module will work on 3.5 (with a small change), but it fails in the way you describe on v4.x.
It’s something in the way Companion is bundling the module that v4 doesn’t like. Thank you for reporting this and for your patience while I get to the bottom of this issue!