NestJs:Angular Universal ReferenceError - KeyboardEvent 未定义

NestJs : Angular Universal ReferenceError - KeyboardEvent is not defined

请协助,我创建了一个 angular 8 项目,然后添加了 @nestjs/ng-universal 以添加 nestjs 作为我的服务器端,一切都 运行 顺利,直到我添加了 @ain/bootstrap 我们自己的自定义 ui boostrap 组件在搜索并遇到 Angular Universal ReferenceError - KeyboardEvent is not defined and https://github.com/Angular-RU/angular-universal-starter/blob/master/server.ts#L11 后收到以下错误 ReferenceError - KeyboardEvent is not defined。尝试将多米诺骨牌实现到 main.server.ts,因为我没有 server.ts 并在 main.server.ts 中添加 global.KeyboardEvent = null 但仍然得到

    __metadata("design:paramtypes", [KeyboardEvent]),
    ReferenceError: KeyboardEvent is not defined

是在 nestjs main.server.ts 文件中实现 domino 还是解决 ReferenceError: KeyboardEvent is not defined 的方法?我不想删除@ain/bootstrap只是希望@ain/bootstrap不影响nestjs.

看看Universal Nest, specifically at the app.module.ts file of the server side (server dir). This file implements domino to handle DOM object on the server as you should know, those doesn't exist on the server as mentioned on the Angular documentation