Yarn nocobase install --lang=zh-CN 安装的时候提示需要yarn build,但是yarn build的时候又报错

yarn run v1.22.22
$ nocobase install --lang=zh-CN
For production environment, please build the code first.

$ yarn build

error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
root@Debian12:/opt/xx# yarn build
yarn run v1.22.22
$ nocobase build
$ tsup
@nocobase/cache: core/cache build start
@nocobase/cache: build cjs
@nocobase/cache: build declaration
create-nocobase-app: core/create-nocobase-app build start
create-nocobase-app: build cjs
create-nocobase-app: build declaration
@nocobase/logger: core/logger build start
@nocobase/logger: build cjs
@nocobase/logger: build declaration
@nocobase/sdk: core/sdk build start
@nocobase/sdk: build cjs
@nocobase/sdk: build declaration
@nocobase/utils: core/utils build start
@nocobase/utils: build cjs
@nocobase/utils: build declaration
@nocobase/database: core/database build start
@nocobase/database: build cjs
@nocobase/database: build declaration
@nocobase/evaluators: core/evaluators build start
@nocobase/evaluators: build cjs
@nocobase/evaluators: build declaration
@nocobase/resourcer: core/resourcer build start
@nocobase/resourcer: build cjs
@nocobase/resourcer: build declaration
@nocobase/acl: core/acl build start
@nocobase/acl: build cjs
@nocobase/acl: build declaration
@nocobase/actions: core/actions build start
@nocobase/actions: build cjs
@nocobase/actions: build declaration
@nocobase/auth: core/auth build start
@nocobase/auth: build cjs
@nocobase/auth: build declaration
@nocobase/data-source-manager: core/data-source-manager build start
@nocobase/data-source-manager: build cjs
@nocobase/data-source-manager: build declaration
@nocobase/telemetry: core/telemetry build start
@nocobase/telemetry: build cjs
@nocobase/telemetry: build declaration
@nocobase/server: core/server build start
@nocobase/server: build cjs
@nocobase/server: build declaration
packages/core/server/src/gateway/ws-server.ts(49,10): error TS2339: Property ‘on’ does not exist on type ‘WebSocketWithId’.
packages/core/server/src/gateway/ws-server.ts(53,10): error TS2339: Property ‘on’ does not exist on type ‘WebSocketWithId’.
packages/core/server/src/gateway/ws-server.ts(190,15): error TS2339: Property ‘send’ does not exist on type ‘WebSocketWithId’.
TypeScript: 3 semantic errors
TypeScript: emit succeeded (with errors)
/opt/xx/node_modules/gulp-typescript/release/output.js:131
this.streamFull.emit(‘error’, new Error(“TypeScript: Compilation failed”));
^

Error: TypeScript: Compilation failed
at Output.mightFinish (/opt/xx/node_modules/gulp-typescript/release/output.js:131:43)
at /opt/xx/node_modules/gulp-typescript/release/output.js:66:22
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted ‘error’ event on CompileStream instance at:
at /opt/xx/node_modules/gulp-typescript/release/output.js:117:29
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.20.4
/opt/xx/node_modules/execa/lib/error.js:60
error = new Error(message);
^

Error: Command failed with exit code 1: nocobase-build
at makeError (/opt/xx/node_modules/execa/lib/error.js:60:11)
at handlePromise (/opt/xx/node_modules/execa/index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command. (/opt/xx/packages/core/cli/src/commands/build.js:40:7) {
shortMessage: 'Command failed with exit code 1: nocobase-build ',
command: 'nocobase-build ',
escapedCommand: ‘nocobase-build “” “” “” “”’,
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}

Node.js v18.20.4
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.

源码安装的先还原 yarn.lock,删除 node_modules,再重新安装依赖 yarn install,最后再 yarn build

git reset --hard HEAD
rm -rf node_modules
yarn install
yarn build

yarn clean