Issue
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?
Solution
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
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.