Home > Blockchain >  Angular is not recognizing ion tags
Angular is not recognizing ion tags

Time:03-25

I upgraded angular to angular 13 and cannot get my project to build or serve. It appears that Angular isn't recognizing any of my ionic tags in the .html files. What am I missing?

I am able to run npm install without issues. I have deleted the node_modules and package-lock.json files, removed the platform and then run npm install and added the platform back. That is successful, but running ionic serve or ionic cordova build android results in a whole stream of errors that looks like angular isn't seeing the ionic html tags and there are new errors with Promises and more.

I get a ton of these errors: enter image description here

This is what I get when I run Ionic info: enter image description here

my 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"
    ]
  }
}

CodePudding user response:

Figured out what the issue was. MicrosoftSDK had TypeScript 3.1 and first when running "where tsc". I moved the npm directory up in the Environmental Variables. Then I removed Angular and reinstalled it.

  • Related