Error . stackTraceLimit = 25 ; import { Server } from "../lib/server" ; import { RoomCreationEvent , JoinRoomRequestEvent , ConnectionEvent , RoomListingRequestEvent , DisconnectionEvent , JoinRoomEvent , } from "../lib/events" ; const server = new Server ( { port : 22023 , } ) ; server . on ( "roomCreated" , async ( evt ) => { console . log ( "[Event] Server > 'roomCreated'" ) ; let room = evt . room ; room . on ( "playerJoined" , async ( evt ) => { setInterval ( ( ) => { if ( evt . player . connection ) { evt . player . setName ( String ( evt . player . connection . name ) ) ; } } , 2500 ) ; } ) ; } ) ; server . on ( "joinRoomRequest" , async ( evt ) => { console . log ( "[Event] Server > 'joinRoomRequest'" ) ; } ) ; server . on ( "connection" , async ( evt ) => { let connection = evt . connection ; console . log ( `[Event] Server > 'connection'[${ connection . ID }]` ) ; evt . connection . on ( "joinRoomRequest" , async ( evt ) => { console . log ( `[Event] Connection[${ connection . ID }] > 'joinRoomRequest'` ) ; } ) ; evt . connection . on ( "disconnection" , async ( evt ) => { console . log ( `[Event] Connection[${ connection . ID }] > 'disconnection'` ) ; } ) ; evt . connection . on ( "joinRoom" , async ( evt ) => { console . log ( `[Event] Connection[${ connection . ID }] > 'joinRoom'` ) ; } ) ; } ) ; server . on ( "roomListingRequest" , async ( evt ) => { console . log ( "[Event] Server > 'roomListingRequest'" ) ; } ) ; server . on ( "disconnection" , async ( evt ) => { console . log ( "[Event] Server > 'disconnection'" ) ; } ) ; server . listen ( ) ;