角构建错误“在'@ angular / core中找不到导出'ɵɵcomponentHostSyntheticListener'(导入为'i0')”

时间:2020-09-21 06:10:30

标签: angular

我正在尝试建立一个利用透明UI的Angular应用程序。我当前正在使用Angular版本10.1.1。安装/添加了清晰度后,尝试构建时出现以下错误。

ERROR in ./node_modules/@clr/angular/esm2015/utils/animations/expandable-animation/expandable-animation.js 33:8-43
"export 'ɵɵcomponentHostSyntheticListener' (imported as 'i0') was not found in '@angular/core'

ERROR in ./node_modules/@clr/angular/esm2015/utils/animations/expandable-animation/expandable-animation.js 35:8-39
"export 'ɵɵupdateSyntheticHostBinding' (imported as 'i0') was not found in '@angular/core'

ERROR in ./node_modules/@clr/angular/esm2015/utils/drag-and-drop/draggable-ghost.js 96:8-39
"export 'ɵɵupdateSyntheticHostBinding' (imported as 'i0') was not found in '@angular/core'

我对版本进行了一些尝试,认为这可能是较新版本中的错误,但无济于事。这是我的package.json

{
  "name": "my-angular-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "node server.js",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "heroku-postbuild": "ng build --aot --prod"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~10.1.1",
    "@angular/cli": "^10.1.1",
    "@angular/common": "~10.1.1",
    "@angular/cdk": "~10.1.1",
    "@angular/compiler": "~10.1.1",
    "@angular/compiler-cli": "^10.1.1",
    "@angular/core": "~10.1.1",
    "@angular/forms": "~10.1.1",
    "@angular/platform-browser": "~10.1.1",
    "@angular/platform-browser-dynamic": "~10.1.1",
    "@angular/router": "~10.1.1",
    "express": "^4.17.1",
    "path": "^0.12.7",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "typescript": "~3.9.7",
    "zone.js": "~0.10.2",
    "@clr/angular": "4.0.0-rc.1",
    "@clr/ui": "4.0.0-rc.1",
    "@clr/icons": "4.0.0-rc.1",
    "@webcomponents/webcomponentsjs": "^2.0.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1001.1",
    "@angular/cli": "^10.1.1",
    "@angular/compiler-cli": "^10.1.1",
    "@types/jasmine": "~3.5.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "codelyzer": "^6.0.0",
    "enhanced-resolve": "^3.3.0",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~4.0.2"
  },
  "engines": {
    "node": "12.18.3",
    "npm": "6.14.6"
  }
}

我也正在将此部署到Heroku,但不要认为这是问题所在。在添加清晰度之前,我已使其正常工作。另外,由于构建失败,我目前无法部署。

1 个答案:

答案 0 :(得分:1)

通过查看清晰度库,4.0.0-rc.1版本似乎存在问题。

Refer to this issue

尝试将版本升级到已发布的版本。 我还建议您先删除node_modules文件夹。