84

Angular 7.3.6 に更新した後、ng serve で次のエラーが発生します。

ここに画像の説明を入力

./node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/jit-polyfills.js のエラー モジュールが見つかりません: エラー: 'core-js/es7/reflect' を解決できません'\node_modules@angular-devkit\build-angular\src\angular-cli-files\models'

これが私のpackage.jsonの依存関係です:

{
  "name": "frontend",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^7.2.11",
    "@angular/cdk": "^7.3.6",
    "@angular/common": "^7.2.11",
    "@angular/compiler": "^7.2.11",
    "@angular/core": "^7.2.11",
    "@angular/flex-layout": "^7.0.0-beta.24",
    "@angular/forms": "^7.2.11",
    "@angular/http": "^7.2.11",
    "@angular/material": "^7.3.6",
    "@angular/platform-browser": "^7.2.11",
    "@angular/platform-browser-dynamic": "^7.2.11",
    "@angular/router": "^7.2.11",
    "adm-zip": "^0.4.13",
    "core-js": "^2.6.5",
    "hammerjs": "^2.0.8",
    "rxjs": "^6.4.0",
    "rxjs-compat": "^6.0.0-rc.0",
    "tslib": "^1.9.3",
    "zone.js": "^0.9.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.7",
    "@angular/cli": "^7.3.7",
    "@angular/compiler-cli": "^7.2.11",
    "@angular/language-service": "^7.2.11",
    "@types/jasmine": "~3.3.12",
    "@types/jasminewd2": "~2.0.6",
    "@types/node": "~11.12.0",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.3.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.0.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^2.0.5",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "^6.0.0",
    "ts-node": "~8.0.3",
    "tslint": "~5.14.0",
    "typescript": "3.1.6"
  }
}
4

12 に答える 12

106

core-js@2.5.xこのファイル/モジュールを含むものをインストールする必要があります。preset-env docsを参照してください。

于 2019-03-28T14:01:00.560 に答える