Error on Ionic Serve

 ionic serve
> ionic-app-scripts.cmd serve --address localhost --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [05:20:28]  ionic-app-scripts 3.2.4
[app-scripts] [05:20:28]  watch started ...
[app-scripts] [05:20:28]  build dev started ...
[app-scripts] [05:20:28]  typescript error
[app-scripts]             Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom',
[app-scripts]             'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator',
[app-scripts]             'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol',
[app-scripts]             'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string',
[app-scripts]             'es2017.intl', 'esnext.asynciterable'.
[app-scripts] [05:20:28]  ionic-app-script task: "serve"
[app-scripts] [05:20:28]  TypeError: Cannot read property 'replace' of null
[app-scripts] TypeError: Cannot read property 'replace' of null
[app-scripts]     at Object.escapeHtml

ionic info
[ERROR] Error loading ionic-angular package.json: Error: Cannot find module ‘ionic-angular/package’

    Require stack:
    - c:\xampp\htdocs\app-reciklado-ionic\node_modules\ionic\lib\project\index.js
    - c:\xampp\htdocs\app-reciklado-ionic\node_modules\ionic\lib\index.js
    - c:\xampp\htdocs\app-reciklado-ionic\node_modules\ionic\index.js
    - C:\Users\Fred\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

Ionic CLI : 5.4.16
Ionic Framework : not installed
@ionic/app-scripts : 3.2.4

Capacitor:

Capacitor CLI : 2.4.0
@capacitor/core : 2.2.0

Utility:

cordova-res : 0.15.1
native-run : 1.0.0

System:

NodeJS : v12.18.3 (C:\Program Files\nodejs\node.exe)
npm : 6.14.8
OS : Windows 10

in migrate from 3 to 5

{

  "name": "reciklado",

  "description": "Reciklado - Ganhe dinheiro com reciclaveis",

  "version": "0.0.1",

  "author": "LIVE TECH TECNOLOGIA",

  "homepage": "https://reciklado.com/",

  "private": true,

  "scripts": {

    "ng": "ng",

    "start": "ng serve",

    "build": "ng build",

    "test": "ng test",

    "lint": "ng lint",

    "e2e": "ng e2e"

  },

  "dependencies": {

    "@agm/core": "^3.0.0-beta.0",

    "@angular/animations": "^10.0.14",

    "@angular/common": "^10.0.14",

    "@angular/core": "^10.0.14",

    "@angular/forms": "^10.0.14",

    "@angular/platform-browser": "^10.0.14",

    "@angular/platform-browser-dynamic": "^10.0.14",

    "@angular/router": "^10.0.14",

    "@auth0/angular-jwt": "^5.0.1",

    "@capacitor/android": "^2.4.0",

    "@capacitor/core": "2.2.0",

    "@capacitor/ios": "^2.4.0",

    "@ionic-native/card-io": "^5.28.0",

    "@ionic-native/core": "^5.28.0",

    "@ionic-native/device": "^5.28.0",

    "@ionic-native/email-composer": "^5.28.0",

    "@ionic-native/facebook": "^5.28.0",

    "@ionic-native/file": "^5.28.0",

    "@ionic-native/file-chooser": "^5.28.0",

    "@ionic-native/file-transfer": "^5.28.0",

    "@ionic-native/geolocation": "^5.28.0",

    "@ionic-native/globalization": "^5.28.0",

    "@ionic-native/google-analytics": "^5.28.0",

    "@ionic-native/google-maps": "^5.5.0",

    "@ionic-native/google-plus": "^5.28.0",

    "@ionic-native/ionic-webview": "^5.28.0",

    "@ionic-native/keyboard": "^5.28.0",

    "@ionic-native/native-geocoder": "^5.28.0",

    "@ionic-native/network": "^5.28.0",

    "@ionic-native/paypal": "^5.28.0",

    "@ionic-native/social-sharing": "^5.28.0",

    "@ionic-native/splash-screen": "^5.28.0",

    "@ionic-native/status-bar": "^5.28.0",

    "@ionic-native/toast": "^5.28.0",

    "@ionic-native/twitter-connect": "^5.28.0",

    "@ionic/angular": "^5.3.1",

    "@ionic/core": "^5.3.1",

    "@ionic/storage": "^2.3.0",

    "@ngx-translate/core": "^13.0.0",

    "@ngx-translate/http-loader": "^6.0.0",

    "@types/google.analytics": "0.0.40",

    "android-versions": "^1.5.0",

    "autoprefixer": "^7.2.3",

    "capacitor-twitter": "^2.0.0",

    "card.io.cordova.mobilesdk": "^2.1.0",

    "com.paypal.cordova.mobilesdk": "^3.5.0",

    "cordova": "^9.0.0",

    "cordova-android": "^7.1.4",

    "cordova-androidx-build": "^1.0.4",

    "cordova-plugin-add-swift-support": "^2.0.2",

    "cordova-plugin-device": "^2.0.3",

    "cordova-plugin-email": "^1.2.7",

    "cordova-plugin-email-composer": "0.9.2",

    "cordova-plugin-facebook4": "^5.0.0",

    "cordova-plugin-file": "^6.0.2",

    "cordova-plugin-file-transfer": "^1.7.1",

    "cordova-plugin-filechooser": "^1.2.0",

    "cordova-plugin-geolocation": "^3.0.0",

    "cordova-plugin-globalization": "^1.11.0",

    "cordova-plugin-google-analytics": "^1.9.0",

    "cordova-plugin-googlemaps": "^2.7.1",

    "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",

    "cordova-plugin-googleplus": "^7.0.2",

    "cordova-plugin-ionic-keyboard": "^2.2.0",

    "cordova-plugin-ionic-webview": "^1.2.1",

    "cordova-plugin-nativegeocoder": "^3.4.1",

    "cordova-plugin-network-information": "^1.3.4",

    "cordova-plugin-splashscreen": "^5.0.4",

    "cordova-plugin-statusbar": "^2.4.3",

    "cordova-plugin-whitelist": "^1.3.4",

    "cpf_cnpj": "^0.2.0",

    "crypto-md5": "*",

    "jquery-mask-plugin": "^1.14.16",

    "jquery-maskmoney": "^3.0.2",

    "minimist": "^1.2.5",

    "moment": "^2.27.0",

    "numeral": "^2.0.6",

    "rxjs": "^6.6.2",

    "rxjs-compat": "^6.6.2",

    "text-mask-addons": "*",

    "text-mask-all": "^0.2.0",

    "tslib": "^2.0.1",

    "twitter-connect-plugin": "^0.6.0",

    "xml2js": "^0.4.23",

    "zone.js": "~0.10.3"

  },

  "devDependencies": {

    "@angular-devkit/build-angular": "^0.1000.8",

    "@angular/cli": "^10.0.8",

    "@angular/compiler": "^10.0.14",

    "@angular/compiler-cli": "^10.0.14",

    "@angular/language-service": "^10.0.14",

    "@capacitor/cli": "2.4.0",

    "@ionic/angular-toolkit": "^2.3.3",

    "@ionic/lab": "2.0.7",

    "@types/googlemaps": "^3.39.13",

    "@types/jasmine": "^3.5.14",

    "@types/jasminewd2": "~2.0.3",

    "@types/node": "^14.6.4",

    "codelyzer": "^6.0.0",

    "jasmine-core": "~3.5.0",

    "jasmine-spec-reporter": "~5.0.0",

    "karma": "~5.0.0",

    "karma-chrome-launcher": "~3.1.0",

    "karma-coverage-istanbul-reporter": "~3.0.2",

    "karma-jasmine": "~3.3.0",

    "karma-jasmine-html-reporter": "^1.5.0",

    "protractor": "~7.0.0",

    "ts-node": "~8.3.0",

    "tslint": "~6.1.0",

    "typescript": "^3.9.5"

  },

  "cordova": {

    "plugins": {

      "cordova-plugin-device": {},

      "cordova-plugin-ionic-keyboard": {},

      "cordova-plugin-ionic-webview": {},

      "cordova-plugin-splashscreen": {},

      "cordova-plugin-statusbar": {},

      "cordova-plugin-whitelist": {},

      "com.paypal.cordova.mobilesdk": {},

      "cordova-plugin-email": {},

      "cordova-plugin-geolocation": {},

      "cordova-plugin-email-composer": {

        "ANDROID_SUPPORT_V4_VERSION": "27.+"

      },

      "cordova-plugin-google-analytics": {

        "GMS_VERSION": "11.0.1"

      },

      "cordova-plugin-x-socialsharing": {

        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+"

      },

      "cordova-plugin-googlemaps": {

        "API_KEY_FOR_ANDROID": "AIzaSyDSNNvDauFpwpgIQnoSuy6oas96cOcniUk",

        "API_KEY_FOR_IOS": "AIzaSyDSNNvDauFpwpgIQnoSuy6oas96cOcniUk",

        "LOCATION_WHEN_IN_USE_DESCRIPTION": "Show your location on the map",

        "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Trace your location on the map",

        "PLAY_SERVICES_VERSION": "15.0.1",

        "ANDROID_SUPPORT_V4_VERSION": "27.+"

      },

      "cordova-plugin-network-information": {},

      "cordova-plugin-file-transfer": {},

      "cordova-plugin-filechooser": {},

      "cordova-plugin-nativegeocoder": {},

      "cordova-plugin-facebook4": {

        "APP_ID": "206262219905545",

        "APP_NAME": "Reciklado",

        "FACEBOOK_HYBRID_APP_EVENTS": "false",

        "FACEBOOK_ANDROID_SDK_VERSION": "5.0.2"

      },

      "cordova-plugin-googleplus": {

        "REVERSED_CLIENT_ID": "com.googleusercontent.apps.871505187528-4o62bihfdmi88kimrl4jok0na3boc4hu",

        "WEB_APPLICATION_CLIENT_ID": "871505187528-4o62bihfdmi88kimrl4jok0na3boc4hu.apps.googleusercontent.com",

        "PLAY_SERVICES_VERSION": "15.0.1"

      },

      "cordova-plugin-globalization": {}

    },

    "platforms": [

      "android",

      "ios",

      "browser"

    ]

  }

}

i think than i have some plugin than ask app-scripts but is already ionic 5

I do not recommend “migrating” a project in place across major version upgrades. Instead spawn a completely new project and parachute your old app code into it once you’re sure it builds correctly.

was only change type in ionic.config.json from ionic-angular to angular.