Ошибка компиляции при сборке с Angular Ivy - PullRequest
0 голосов
/ 05 июля 2019

У меня есть проект angular 8, и когда я включаю Angular Ivy, он не работает во время компиляции.Когда я проверяю решения, предоставленные другими и обновляющиеся до angular 8.1.0 (с 8.0.3), но проблема все еще сохраняется и продолжает выдавать мне следующую ошибку:

D:\Users\Backup>ng build shared
Building Angular Package
Building entry point 'shared'
Compiling TypeScript sources through ngc

BUILD ERROR
node_modules/@angular/common/common.d.ts(115,22): error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
node_modules/@angular/forms/forms.d.ts(2669,22): error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
node_modules/@angular/forms/forms.d.ts(3703,22): error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
node_modules/@angular/common/http/http.d.ts(2799,22): error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class

Мой Angular Ivy включен вtsconfig.app.json.

"angularCompilerOptions": {
    "enableIvy": true
  }

Мой package.json имеет следующие зависимости:

"dependencies": {
    "@angular/animations": "~8.0.3",
    "@angular/common": "~8.0.3",
    "@angular/compiler": "~8.0.3",
    "@angular/core": "~8.0.3",
    "@angular/forms": "~8.0.3",
    "@angular/material": "^8.0.1",
    "@angular/platform-browser": "~8.0.3",
    "@angular/platform-browser-dynamic": "~8.0.3",
    "@angular/platform-server": "~8.0.3",
    "@angular/router": "~8.0.3",
    "@ng-bootstrap/ng-bootstrap": "^5.0.0-rc.0",
    "@nguniversal/express-engine": "^7.1.1",
    "@nguniversal/module-map-ngfactory-loader": "0.0.0",
    "@nicky-lenaers/ngx-scroll-to": "^2.0.0",
    "@swimlane/ngx-charts": "^11.1.0",
    "@types/googlemaps": "^3.36.5",
    "core-js": "^2.5.4",
    "express": "^4.15.2",
    "ngx-cookie-service": "^2.2.0",
    "ngx-typeahead": "^6.2.0",
    "rxjs": "~6.5.2",
    "systemjs": "3.0.2",
    "tslib": "^1.10.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.800.6",
    "@angular-devkit/build-ng-packagr": "~0.800.6",
    "@angular/cli": "~8.0.6",
    "@angular/compiler-cli": "~8.0.3",
    "@angular/language-service": "~8.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.1",
    "jasmine": "^3.3.1",
    "jasmine-core": "^3.3.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "~4.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "ng-packagr": "^5.1.0",
    "prettier": "^1.16.4",
    "tsickle": ">=0.34.0",
    "ts-loader": "^5.2.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.4.5",
    "webpack-cli": "^3.1.0"
  }

Пожалуйста, помогите мне, как решить вышеуказанные проблемы.

...