ERROR: cordova-res was not found on your PATH

Abdelfattah Elachkoura picture Abdelfattah Elachkoura · Jun 17, 2019 · Viewed 13.8k times · Source

I have a problem in my app ionic 4, when i run ionic cordova platform add android I have this error :

[ERROR] cordova-res was not found on your PATH. Please install it globally:
npm i -g cordova-res

And when I run npm i -g cordova-res I cant't install it. How to solve this problem?

Answer

Manvender Singh Rathore picture Manvender Singh Rathore · Jun 27, 2019

There are many offline/local options available for resizing Cordova resources. Ionic even has one now: cordova-res. I started the project in an attempt to deprecate the legacy resources service as soon as possible. You can try it today:

npm i -g cordova-res
ionic cordova resources --cordova-res

Hope this will help, Cheers !