Performance variable is undefined on cloud (solved)

While trying to host my server code on Colyseus Arena, I've come up with a problem - I can't use because it is undefined. Although it works fine on local server.

For illustration I took a simple server template and put logging of in onJoin method

And with a simple client that just joins the room I have a following log

Is there any idea why it could be the case? Is there any workaround?

I think performance() is based on OS, please try to import it first:

import { performance } from 'perf_hooks';

and then use it as usual.

console.log("test: " +;


@coco thank you very much!
The thing I didn't mentioned in initial post is that performance is used by third party module - box2D. And one can't import there
And with your advice I've end up adding it to to the global scope in my arena.config