下表仅供参考, 如果问题紧急, 请 发工单至 support.colyseus.io.
报错 | 原因 | 解决 |
---|---|---|
spawn git ENOENT |
找不到Git命令 | 安装Git/配置Git路径 |
XXX has been blocked by CORS policy |
http请求试图调用https资源/本地试图访问网络资源 | 统一使用https/配置跨域访问政策文件 |
SyntaxError: Unexpected token '.' |
NodeJS版本太旧 | 升级NodeJS |
MissingMethodException: Default constructor not found |
引擎代码被删减 | 尝试关闭 code stripping |
TypeError: Cannot assign to read only property 'map' of object '#<QueryCursor>' |
NodeJS版本太旧 | 升级NodeJS |
Error: missing serializer |
客户端/服务器版本不一致 | 统一SDK到当前版本 |
Error: seat reservation expired |
客户端未实例化或数量过大/redis驱动不匹配/matchAPI无法正常工作 | 等待客户端完成实例化/升级服务端容量/升级redis驱动 |
Class constructor Room cannot be invoked without 'new' |
Typescript编译版本过低 | 配置Typescript编译目标 "es2015" 或更高 |
Type 'number[]' is missing the following properties from type 'ArraySchema<number>' |
schema类型写错 | ArraySchema<number>的类型是number[] |
ERROR in XXX.d.ts ... XXX expected |
Typescript版本过低 | 升级Typescript: npm install --save-dev typescript@latest |
npm ERR! Could not resolve XXX |
npm命令执行错误 | 重新安装相关依赖模块 |
net::ERR_SSL_PROTOCOL_ERROR |
使用了ip地址进行SSL连接 | 改用https://domain进行连接 |
TypeError: Cannot read properties of undefined (reading 'prototype') |
依赖库版本不匹配 | 尝试运行 npm update 命令 |
Right-hand side of 'instanceof' is not callable |
schema类型写错 | 检测并修复schema |
IPC timed out. method: undefined |
Room代码有错 | 检查Room及其定义相关代码 |