An error occurred while running subprocess cordova-res

Hi, I’m hoping someone can help me. I’m trying to learn ionic and it’s not going very well.

I’m getting an error when I run this: ionic cordova platform add android
It runs partway, then throws an error. Here is what I’m getting in the CLI:

> cordova.cmd platform add android
Using cordova-fetch for cordova-android@^8.0.0
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: io.ionic.starter
        Name: MyApp
        Activity: MainActivity
        Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.0.0
config file *-Info.plist requested for changes not found at C:\Users\Admin\_Dev\_Projects\Sandbox\MyApp\platforms\android\*-Info.plist, ignoring
Installing "cordova-plugin-camera" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-ionic-keyboard" for android
Installing "cordova-plugin-ionic-webview" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

config file *-Info.plist requested for changes not found at C:\Users\Admin\_Dev\_Projects\Sandbox\MyApp\platforms\android\*-Info.plist, ignoring
> ionic cordova resources android --force
> cordova-res.cmd android
[cordova-res] internal/modules/cjs/loader.js:716
[cordova-res]     throw err;
[cordova-res]     ^
[cordova-res]
[cordova-res] Error: Cannot find module 'C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova-res\bin\cordova-res'
[cordova-res]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:713:15)
[cordova-res]     at Function.Module._load (internal/modules/cjs/loader.js:618:27)
[cordova-res]     at Function.Module.runMain (internal/modules/cjs/loader.js:931:10)
[cordova-res]     at internal/main/run_main_module.js:17:11 {
[cordova-res]   code: 'MODULE_NOT_FOUND',
[cordova-res]   requireStack: []
[cordova-res] }
[ERROR] An error occurred while running subprocess cordova-res.

        cordova-res.cmd android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Anyone see what might be the problem?
Thanks, Dan

Any ideas, anyone? Or is this in the wrong category?
Thanks!

I’m also facing the same issue.

[cordova-res] internal/modules/cjs/loader.js:638
[cordova-res]     throw err;
[cordova-res]     ^
[cordova-res]
[cordova-res] Error: Cannot find module 'C:\Users\user\AppData\Roaming\npm\node_
modules\cordova-res\bin\cordova-res'
[cordova-res]     at Function.Module._resolveFilename (internal/modules/cjs/load
er.js:636:15)
[cordova-res]     at Function.Module._load (internal/modules/cjs/loader.js:562:2
5)
[cordova-res]     at Function.Module.runMain (internal/modules/cjs/loader.js:829
:12)
[cordova-res]     at startup (internal/bootstrap/node.js:283:19)
[cordova-res]     at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
[ERROR] An error occurred while running subprocess cordova-res.

My Ionic info is below:


Ionic:

   Ionic CLI                     : 5.2.3 (C:\Users\user\AppData\Roaming\npm\node
_modules\ionic)
   Ionic Framework               : @ionic/angular 4.6.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : none
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic
-webview 4.1.1, (and 4 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.8

System:

   Android SDK Tools : 26.1.1 (C:\Users\user\AppData\Local\Android\Sdk)
   NodeJS            : v10.16.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 7

Does anyone has a suggestion?
Thank you