ReferenceError:未定义HTMLVideoElement

问题描述 投票:0回答:1

尝试为SSR构建Angular 9 Universal项目时收到此错误:

/Users/my-project/dist/server.js:28676 Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__metadata"])("design:type", HTMLVideoElement)

ReferenceError: HTMLVideoElement is not defined

我在项目中使用mat-video播放器,但我怀疑这是导致错误的原因,但我不确定如何解决此问题。有什么想法吗?

我的tsconfig.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2015",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ],
    "module": "esnext",
    "resolveJsonModule": true,
  }
}
angular typescript angular-universal referenceerror
1个回答
0
投票

我遇到了同样的问题,您解决了吗?

© www.soinside.com 2019 - 2024. All rights reserved.