我已经在我的 kubuntu 22.04 上安装了 soketi,但是启动它时出现错误:
$ soketi start
/usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js:22
throw new Error('This version of uWS.js supports only Node.js 14, 16 and 18 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
^
Error: This version of uWS.js supports only Node.js 14, 16 and 18 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).
Error: Cannot find module './uws_linux_x64_115.node'
Require stack:
- /usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js
- /usr/lib/node_modules/@soketi/soketi/dist/server.js
- /usr/lib/node_modules/@soketi/soketi/dist/index.js
- /usr/lib/node_modules/@soketi/soketi/dist/cli/cli.js
- /usr/lib/node_modules/@soketi/soketi/dist/cli/index.js
- /usr/lib/node_modules/@soketi/soketi/bin/server.js
at /usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js:22:9
at Object.<anonymous> (/usr/lib/node_modules/@soketi/soketi/node_modules/uWebSockets.js/uws.js:24:3)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/usr/lib/node_modules/@soketi/soketi/dist/server.js:18:13)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
Node.js v20.12.2
我的操作系统中有:
$ node -v
v20.12.2
$ npm -v
10.5.0
$ uname -a
lsb_release -d; uname -r; uname -i
Linux master-at-home 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Description: Ubuntu 22.04.4 LTS
6.5.0-28-generic
x86_64
看起来我的 node 版本太高了?我是否已将操作系统上的 node 版本降低至 18?哪种方法更好?