egg_error

Property 'sockets' does not exist on type 'EggSocketNameSpace'

const nsp = app.io.of('/');
const socket = nsp.sockets[socketId];

修改为

const nsp: any = app.io.of('/');
const socket = nsp.sockets[socketId];

你可能感兴趣的:(egg_error)