1
votes

ionic-app-script task: "build" TypeError: Cannot read property 'getStart' of undefined TypeError: Cannot read property 'getStart' of undefined

Tried Changing the JsxAttribute interface (removed all code from inside it), not working, tried updating and downgrading tslint and typescript, also not working.

This is my Package.json

 {
  "name": "TransporterUI",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "^5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "^7.2.1",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@angular/router": "^7.2.1",
    "@auth0/angular-jwt": "^2.1.0",
    "@ionic-native/android-permissions": "^4.18.0",
    "@ionic-native/core": "~4.17.0",
    "@ionic-native/location-accuracy": "^4.18.0",
    "@ionic-native/splash-screen": "~4.17.0",
    "@ionic-native/status-bar": "~4.17.0",
    "@ionic/angular": "^4.0.0",
    "@ionic/storage": "^2.2.0",
    "angular": "^1.7.6",
    "angular2-jwt": "^0.2.3",
    "cordova": "^8.1.2",
    "cordova-android": "7.1.4",
    "cordova-plugin-android-permissions": "1.0.0",
    "cordova-plugin-camera": "4.0.3",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^3.1.1",
    "cordova-plugin-permission": "^0.1.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-ext": "^2.3.0",
    "cordova-sqlite-storage": "2.6.0",
    "cordova.plugins.diagnostic": "4.0.10",
    "ionic": "^4.8.0",
    "ionic-angular": "^3.9.2",
    "ionic-app-lib": "^2.2.1",
    "ionicons": "3.0.0",
    "latest": "^0.2.0",
    "material-design-lite": "^1.3.0",
    "npm": "^6.6.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "tslint": "^5.12.1",
    "v1": "^1.0.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^3.2.2",
    "typescript": "^3.2.4"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-android-permissions": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova.plugins.diagnostic": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      }
    },
    "platforms": [
      "android"
    ]
  }

StackTrace:

[10:49:03] ionic-app-script task: "build" [10:49:03] TypeError: Cannot read property 'getStart' of undefined TypeError: Cannot read property 'getStart' of undefined at Object.replaceNode (C:\Users\Administrator\Desktop\ClientUI\node_modules@ionic\app-scripts\dist\util\typescript-utils.js:34:27) at Object.getUpdatedAppNgModuleContentWithDeepLinkConfig (C:\Users\Administrator\Desktop\ClientUI\node_modules@ionic\app-scripts\dist\deep-linking\util.js:267:31) at C:\Users\Administrator\Desktop\ClientUI\node_modules@ionic\app-scripts\dist\transpile.js:139:39 at new Promise () at transpileWorker (C:\Users\Administrator\Desktop\ClientUI\node_modules@ionic\app-scripts\dist\transpile.js:107:12) at Object.transpile (C:\Users\Administrator\Desktop\ClientUI\node_modules@ionic\app-scripts\dist\transpile.js:64:12) at C:\Users\Administrator\Desktop\ClientUI\node_modules@ionic\app-scripts\dist\build.js:109:82 at [ERROR] An error occurred while running subprocess ionic-app-scripts.

Vulnerabilty errors: npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself. npm WARN @ionic/[email protected] requires a peer of @angular-devkit/core@^7.2.1 but none is installed. You must install peer dependencies yourself. npm WARN @ionic/[email protected] requires a peer of @angular-devkit/schematics@^7.2.1 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/core@^2.0.0||^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of @angular/http@^2.0.0||^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of rxjs@^5.0.0 but none is installed. You must install peer dependencies yourself.

added 67 packages from 26 contributors and updated 1 package in 33.915s fixed 2 of 136 vulnerabilities in 26104 scanned packages 134 vulnerabilities required manual review and could not be updated

2
what is getStart? if it is a variable/property then make it publicashish pal
your package.json is pointless here, give us some codeKraken
maybe it is internal property of Typescript.d.ts, i have not defined any varibale/method named same.sourabh ghorpade
Add full stack trace error.Rakesh Makluri
edited and added stack tracesourabh ghorpade

2 Answers

0
votes

Seems like you have dependency mismatch with the package versions, to fix it you need to install the matched versions or latest versions of the packages.

To easily do that, you can use npm check updates

Run :

npm i -g npm-check-updates       # Install the package first
ncu                              # shows all the upgradable packages
ncu -u                           # To upgrade
npm install                      # update installed packages and package-lock.json

and also try to delete package-lock.json first to fresh up with new installs.

0
votes

Actually there was an error with App-scripts in ionic module.i changed it with => https://github.com/ionic-team/ionic-app-scripts.git this app-script and it worked Thanks though. ;)