Angular 无法识别离子标签

Angular is not recognizing ion tags

我将 angular 升级到 angular 13,但无法构建或提供我的项目。 Angular 似乎无法识别 .html 文件中的任何离子标签。我错过了什么?

我能够 运行 npm install 没有问题。 我删除了 node_modules 和 package-lock.json 文件,删除了平台,然后 运行 npm install 并重新添加了平台。这是成功的,但是 运行ning ionic serve 或 ionic cordova build android 导致整个错误流,看起来 angular 没有看到 ionic html 标签和Promises 等有新的错误。

我遇到了很多这样的错误:

这是我在 运行 Ionic 信息时得到的:

我的package.json.....

    {
  "name": "com.xyz.product",
  "version": "1.5.1",
  "author": "Me",
  "homepage": "https://homepage.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/schematics": "^13.2.6",
    "@angular/animations": "13.3.0",
    "@angular/common": "13.3.0",
    "@angular/core": "^13.3.0",
    "@angular/forms": "13.3.0",
    "@angular/platform-browser": "13.3.0",
    "@angular/platform-browser-dynamic": "13.3.0",
    "@angular/router": "13.3.0",
    "@fortawesome/angular-fontawesome": "^0.10.2",
    "@fortawesome/fontawesome-svg-core": "^6.1.0",
    "@fortawesome/pro-light-svg-icons": "^6.1.0",
    "@ionic-native/app-version": "5.28.0",
    "@ionic-native/barcode-scanner": "5.28.0",
    "@ionic-native/camera": "5.28.0",
    "@ionic-native/core": "5.28.0",
    "@ionic-native/device": "5.28.0",
    "@ionic-native/file": "5.28.0",
    "@ionic-native/file-opener": "5.28.0",
    "@ionic-native/file-transfer": "^5.36.0",
    "@ionic-native/in-app-browser": "5.28.0",
    "@ionic-native/keyboard": "5.28.0",
    "@ionic-native/launch-navigator": "5.28.0",
    "@ionic-native/network": "5.28.0",
    "@ionic-native/splash-screen": "5.28.0",
    "@ionic-native/sqlite": "5.28.0",
    "@ionic-native/status-bar": "5.28.0",
    "@ionic/angular": "^6.0.12",
    "@ionic/cordova-builders": "^6.1.0",
    "@ionic/storage": "2.3.1",
    "angularx-qrcode": "^13.0.3",
    "hammerjs": "2.0.8",
    "latest-version": "^1.0.1",
    "moment": "2.27.0",
    "rxjs-compat": "6.5.5",
    "signature_pad": "4.0.0",
    "tslib": "^2.0.0",
    "zone.js": "^0.11.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^13.3.0",
    "@angular/cli": "^13.3.0",
    "@angular/compiler": "13.3.0",
    "@angular/compiler-cli": "13.3.0",
    "@angular/language-service": "13.3.0",
    "@ionic/angular-toolkit": "^6.1.0",
    "@types/jasmine": "~3.5.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "12.11.1",
    "codelyzer": "6.0.0",
    "cordova-android": "^9.1.0",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-androidx-adapter": "^1.1.3",
    "cordova-plugin-app-version": "^0.1.13",
    "cordova-plugin-camera": "^6.0.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-dialogs": "^2.0.2",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-file-opener2": "^3.0.5",
    "cordova-plugin-inappbrowser": "5.0.0",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^5.0.0",
    "cordova-plugin-network-information": "^3.0.0",
    "cordova-plugin-splashscreen": "^6.0.0",
    "cordova-plugin-statusbar": "^3.0.0",
    "cordova-sqlite-storage": "^6.0.0",
    "jasmine-core": "~3.8.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "^6.3.14",
    "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",
    "phonegap-plugin-barcodescanner": "^8.1.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "^5.12.1",
    "typescript": "4.6.2",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.6"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-device": {},
      "cordova-plugin-file": {},
      "cordova-plugin-file-opener2": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-androidx-adapter": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-network-information": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-sqlite-storage": {},
      "phonegap-plugin-barcodescanner": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-plugin-actionsheet": {},
      "cordova-plugin-camera": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+",
        "ANDROIDX_CORE_VERSION": "1.6.+"
      },
      "cordova-plugin-app-version": {}
    },
    "platforms": [
      "android"
    ]
  }
}

找出问题所在。 MicrosoftSDK 有 TypeScript 3.1 并且首先是 运行 “where tsc”。我在环境变量中向上移动了 npm 目录。然后我删除了 Angular 并重新安装了它。