You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用@socket.io/cluster-adapter的createAdapter()时触发TypeError: Cannot read properties of undefined (reading 'id')错误

使用@socket.io/cluster-adapter的createAdapter()时触发TypeError: Cannot read properties of undefined (reading 'id')错误

我最近在尝试给Socket.IO配置PM2集群模式支持,照着官方的集群相关配置步骤操作,但在调用@socket.io/cluster-adapter中的createAdapter()方法时,触发了这样的错误:TypeError: Cannot read properties of undefined (reading 'id')

以下是我目前的代码片段:

import { createAdapter } from "@socket.io/redis-adapter";
import { createAdapter as createClusterAdapter } from "@socket.io/cluster-adapter";
import { setupWorker } from "@socket.io/sticky";

const app = express();
export const server = 

备注:内容来源于stack exchange,提问作者michioxd

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.13 17:19:31