Ionic Pro Build failing :Error: Failed to transpile program

I am getting this error and my build is failing on Ionic Pro. My app builds fine on locally when I run ionic cordova run android. Also works fine on Phonegap build. I am getting this error:

Error: Failed to transpile program
Error: Failed to transpile program
at new BuildError (/usr/src/app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at /usr/src/app/node_modules/@ionic/app-scripts/dist/transpile.js:159:20
at new Promise ()
at transpileWorker (/usr/src/app/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
at Object.transpile (/usr/src/app/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
at /usr/src/app/node_modules/@ionic/app-scripts/dist/build.js:109:82
at
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@0.0.0 build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gitlab-runner/.npm/_logs/2018-08-27T10_33_24_774Z-debug.log
npm run build failed