[FIXED] Cordova error with ionic : Unable to load Platform API from… Cannot find module 'properties-parser'


I wanted to get the device model into my ionic v5 app.

I wanted to use Cordova for that purpose running the following ionic cordova plugin add cordova-plugin-device, but I did get the following error.

Installing "cordova-plugin-device" for android
Failed to install 'cordova-plugin-device': Error: Unable to load Platform API from C:\Users\my-project\platforms\android\cordova\Api.js:
Cannot find module 'properties-parser'

Did somebody already had this error and find a solution to it?


Ok, find a workaround.

Somehow, while trying to add the cordova-plugin-device cordova did try to use stuff inside the platforms folder.

To fix the problem, I had to remove them using ionic cordova platform rm android then I could run the command again and it worked as expected.

Answered By – Raphaël Balet

Answer Checked By – Marie Seifert (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published