* 描述问题
* 运行环境
- NocoBase 版本:1.8.4
- 数据库种类与版本: PostgreSQL
- 操作系统:Windows
-浏览器及版本 谷歌浏览
- 部署方式: 源码
- Docker 镜像版本:
- NodeJS 版本:
如何重现
最新代码分支执行yarn build
预期行为
通过
截图
日志
PS E:\code\taichuCode\nocobase_server> yarn build
yarn run v1.22.22
$ nocobase build
$ tsup
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
(node:12328) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use node --trace-deprecation ...
to show where the warning was created)
@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
E:/code/taichuCode/nocobase_server/packages/core/database/lib/collection.js(1,1): error TS9006: Declaration emit for this file requires using private name ‘StaticEventEmitterOptions’ from module ‘“events”’. An explicit type annotation may unblock declaration emit.
E:/code/taichuCode/nocobase_server/packages/core/database/lib/collection.js(1,1): error TS9006: Declaration emit for this file requires using private name ‘_DOMEventTarget’ from module ‘“events”’. An explicit type annotation may unblock declaration emit.
E:/code/taichuCode/nocobase_server/packages/core/database/lib/collection.js(1,1): error TS9006: Declaration emit for this file requires using private name ‘_NodeEventTarget’ from module ‘“events”’. An explicit type annotation may unblock declaration emit.
E:/code/taichuCode/nocobase_server/packages/core/database/lib/database.js(1,1): error TS9006: Declaration emit for this file requires using private name ‘StaticEventEmitterOptions’ from module ‘“events”’. An explicit type annotation may unblock declaration emit.
E:/code/taichuCode/nocobase_server/packages/core/database/lib/database.js(1,1): error TS9006: Declaration emit for this file requires using private name ‘_DOMEventTarget’ from module ‘“events”’. An explicit type annotation may unblock declaration emit.
E:/code/taichuCode/nocobase_server/packages/core/database/lib/database.js(1,1): error TS9006: Declaration emit for this file requires using private name ‘_NodeEventTarget’ from module ‘“events”’. An explicit type annotation may unblock declaration emit.
E:/code/taichuCode/nocobase_server/packages/core/database/lib/fields/relation-field.js(1,1): error TS9005: Declaration emit for this file requires using private name ‘_RelationField.TargetModel’. An explicit type annotation may unblock declaration emit.
packages\core\database\src\mock-database.ts(11,10): error TS2305: Module ‘“…/lib”’ has no exported member ‘Database’.
packages\core\database\src\mock-database.ts(11,20): error TS2305: Module ‘“…/lib”’ has no exported member ‘IDatabaseOptions’.
packages\core\database\src\relation-repository\types.ts(10,10): error TS2305: Module ‘“…/…/lib”’ has no exported member ‘AssociationKeysToBeUpdate’.
packages\core\database\src\relation-repository\types.ts(10,37): error TS2305: Module ‘“…/…/lib”’ has no exported member ‘BlackList’.
packages\core\database\src\relation-repository\types.ts(10,48): error TS2305: Module ‘“…/…/lib”’ has no exported member ‘Values’.
packages\core\database\src\relation-repository\types.ts(10,56): error TS2305: Module ‘“…/…/lib”’ has no exported member ‘WhiteList’.
TypeScript: 6 semantic errors
TypeScript: 17 declaration errors
TypeScript: -10 emit errors
TypeScript: emit succeeded (with errors)
E:\code\taichuCode\nocobase_server\node_modules\gulp-typescript\release\output.js:131
this.streamFull.emit(‘error’, new Error(“TypeScript: Compilation failed”));
^
Error: TypeScript: Compilation failed
at Output.mightFinish (E:\code\taichuCode\nocobase_server\node_modules\gulp-typescript\release\output.js:131:43)
at E:\code\taichuCode\nocobase_server\node_modules\gulp-typescript\release\output.js:66:22
at processTicksAndRejections (node:internal/process/task_queues:105:5)
Emitted ‘error’ event on CompileStream instance at:
at E:\code\taichuCode\nocobase_server\node_modules\gulp-typescript\release\output.js:117:29
at processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.12.0
E:\code\taichuCode\nocobase_server\node_modules\execa\lib\error.js:60
error = new Error(message);
^
Error: Command failed with exit code 1: nocobase-build
at makeError (E:\code\taichuCode\nocobase_server\node_modules\execa\lib\error.js:60:11)
at handlePromise (E:\code\taichuCode\nocobase_server\node_modules\execa\index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Command. (E:\code\taichuCode\nocobase_server\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 v22.12.0
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
PS E:\code\taichuCode\nocobase_server>