Ionic Serve在更新的插件中显示了一个奇怪的模糊错误以及TypeScript错误

问题描述

背景:我需要更新Ionic Native Diagnostics插件,这也意味着我需要更新Ionic和Cordova,这意味着我必须更新其他插件负载。现在,当我运行 serve 时,它会启动到浏览器中的应用程序标签,并且我得到这个非常模糊的错误

Uncaught TypeError: Object(...) is not a function
    at index.js:180
    at Object.<anonymous> (index.js:288)
    at __webpack_require__ (bootstrap cdffef1f7fc76aa91393:54)
    at Object.377 (main.ts:5)
    at __webpack_require__ (bootstrap cdffef1f7fc76aa91393:54)
    at Object.372 (main.ts:1)
    at __webpack_require__ (bootstrap cdffef1f7fc76aa91393:54)
    at webpackJsonpCallback (bootstrap cdffef1f7fc76aa91393:25)
    at main.js:1

在此我也得到了很多TypeScript错误列表: node_modules/@angular/core/core.d.ts

以下是我的离子信息:

Ionic:

   Ionic CLI                     : 5.4.16
   Ionic Framework               : @ionic/angular 5.3.3
   @angular-devkit/build-angular : 0.1001.2
   @angular-devkit/schematics    : 10.1.2
   @angular/cli                  : 10.1.2
   @ionic/angular-toolkit        : 2.3.3

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : none
   Cordova Plugins   : cordova-plugin-ionic-webview 4.2.1,(and 18 other plugins)

Utility:

   cordova-res                          : 0.15.1
   native-run (update available: 1.1.0) : 1.0.0

System:

   ios-deploy : 1.10.0
   ios-sim    : ios-sim/9.0.0 darwin-x64 node-v14.12.0
   NodeJS     : v14.12.0 (/usr/local/bin/node)
   npm        : 6.14.8
   OS         : macOS Catalina
   Xcode      : Xcode 12.0 Build version 12A7209

下面是我的package.json:

{
  "name": "PaylessCustomerPortal","version": "2.0.0","author": "High Touch Technologies","homepage": "http://hightouchtechnologies.com/","private": true,"scripts": {
    "clean": "ionic-app-scripts clean","build": "ionic-app-scripts build","lint": "ionic-app-scripts lint","ionic:build": "ionic-app-scripts build","ionic:serve": "ionic-app-scripts serve"
  },"dependencies": {
    "@angular-devkit/build-angular": "^0.1001.2","@angular-devkit/build-webpack": "^0.1001.2","@angular/cli": "^10.1.2","@angular/common": "^10.1.1","@angular/compiler": "^10.1.2","@angular/compiler-cli": "^10.1.2","@angular/core": "^10.1.1","@angular/forms": "^10.1.1","@angular/http": "^7.2.16","@angular/platform-browser": "^10.1.1","@angular/platform-browser-dynamic": "^10.1.2","@angular/router": "^10.1.1","@ionic-native/android-permissions": "^4.20.0","@ionic-native/call-number": "^4.20.0","@ionic-native/camera": "^4.20.0","@ionic-native/core": "^5.28.0","@ionic-native/diagnostic": "^5.28.0","@ionic-native/file": "^4.20.0","@ionic-native/geolocation": "^5.28.0","@ionic-native/google-maps": "^4.15.1","@ionic-native/in-app-browser": "^5.27.0","@ionic-native/launch-navigator": "^5.28.0","@ionic-native/sms": "^4.20.0","@ionic-native/splash-screen": "^5.28.0","@ionic-native/status-bar": "^5.28.0","@ionic/angular": "^5.3.2","@ionic/angular-toolkit": "^2.3.3","@ionic/cli-framework": "^5.0.4","@ionic/cli-utils": "^2.2.1","@ionic/storage": "^2.2.0","call-number": "^1.0.1","cordova-android": "^8.0.0","cordova-android-play-services-gradle-release": "^2.1.0","cordova-common": "^3.2.1","cordova-plugin-actionsheet": "^2.3.3","cordova-plugin-add-swift-support": "2.0.2","cordova-plugin-android-permissions": "^1.0.2","cordova-plugin-androidx": "^1.0.2","cordova-plugin-androidx-adapter": "^1.1.1","cordova-plugin-camera": "^4.1.0","cordova-plugin-device": "^2.0.3","cordova-plugin-dialogs": "^2.0.2","cordova-plugin-file": "^6.0.2","cordova-plugin-geolocation": "^4.0.2","cordova-plugin-googlemaps": "^2.7.1","cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git","cordova-plugin-inappbrowser": "^4.0.0","cordova-plugin-ionic-webview": "^4.2.1","cordova-plugin-splashscreen": "^5.0.4","cordova-plugin-statusbar": "^2.4.3","cordova-plugin-whitelist": "^1.3.4","cordova-sms-plugin": "^1.0.0","cordova.plugins.diagnostic": "^6.0.2","crypto-js": "^3.1.9-1","ionic": "^5.4.16","ionic-plugin-keyboard": "^2.2.1","ionicons": "3.0.0","minimist": "^1.2.5","mx.ferreyra.callnumber": "0.0.2","npm": "^6.14.7","object-keys": "^1.0.12","rxjs": "6.6.3","sw-toolBox": "3.6.0","uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.5","webpack": "^4.44.2","xml2js": "^0.4.19","zone.js": "^0.10.3"
  },"devDependencies": {
    "@ionic/app-scripts": "^3.2.4","typescript": "^4.0.3"
  },"description": "An Ionic project","cordova": {
    "plugins": {
      "ionic-plugin-keyboard": {},"cordova-plugin-android-permissions": {},"mx.ferreyra.callnumber": {},"cordova-plugin-device": {},"cordova-plugin-splashscreen": {},"cordova-plugin-statusbar": {},"cordova-plugin-whitelist": {},"call-number": {},"cordova-plugin-actionsheet": {},"cordova-plugin-inappbrowser": {},"cordova-plugin-camera": {
        "CAMERA_USAGE_DESCRIPTION": "This app requires access to your camera to be able to take a profile photo","PHOTOLIBRARY_USAGE_DESCRIPTION": "This app requires access to your library to store your profile image","ANDROID_SUPPORT_V4_VERSION": "27.+"
      },"cordova-plugin-file": {},"cordova-android-play-services-gradle-release": {
        "PLAY_SERVICES_VERSION": "15.+"
      },"cordova-plugin-googlemaps": {
        "API_KEY_FOR_ANDROID": "AIzaSyAjkke-mUPNVkrF9m4QMT4juJ1Wv6pBgzM","API_KEY_FOR_IOS": "AIzaSyAjkke-mUPNVkrF9m4QMT4juJ1Wv6pBgzM","PLAY_SERVICES_VERSION": "15.0.1","ANDROID_SUPPORT_V4_VERSION": "27.+","LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.","LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always,even this app runs in background."
      },"cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "need location access to find things nearby"
      },"cordova-sms-plugin": {},"cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },"cordova-plugin-androidx": {},"cordova-plugin-androidx-adapter": {},"cordova-plugin-add-swift-support": {},"cordova.plugins.diagnostic": {},"uk.co.workingedge.phonegap.plugin.launchnavigator": {}
    },"platforms": [
      "android"
    ]
  }
}

我怀疑我的某个地方仍然存在依赖项问题,但不确定要查找什么。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)