4
votes

I am getting an error when I try to run ionic cordova run android:

Error: Failed to transpile program

at new BuildError (/home/sevenbits/sevenbits-git/androidapplications/IonicBlockchainApp/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)

at /home/sevenbits/sevenbits-git/androidapplications/IonicBlockchainApp/node_modules/@ionic/app-scripts/dist/transpile.js:159:20

at new Promise ()

at transpileWorker (/home/sevenbits/sevenbits-git/androidapplications/IonicBlockchainApp/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)

at Object.transpile (/home/sevenbits/sevenbits-git/androidapplications/IonicBlockchainApp/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)

at /home/sevenbits/sevenbits-git/androidapplications/IonicBlockchainApp/node_modules/@ionic/app-scripts/dist/build.js:109:82

at <anonymous>

I really don't know where the error came from. How can I fix it?

2
try using ionic doctor check maybe it will show the direct issue in project - siddhant sankhe
@siddhantsankhe i tried that command. it detected 0 issues. - Riddhi
@Riddhi can u check whether android is installed properly as well as the permissions are given as well can u confirm whether r u using any local forage - Nidhin Kumar
@Riddhi try to reinstall the node again - Nidhin Kumar
@Riddhi check your typescript version, in my latest project version is "typescript": "~2.6.2" and @ionic/app-scripts to latest version - siddhant sankhe

2 Answers

2
votes

I updated typescript by typing npm install [email protected] and worked.

0
votes

Please try to lock ionic/app-scripts to v3.2.3, also you can use ionic doctor check if any other issue.