Ionic cordova android cordoiva-plugin-app-preferences error

I get the following error when trying to add an android as a platform. I used to use android 7.1.4 till now and it was working, I am now trying to use android 8.0.0. BTW, I had problems app-preferences earlier too but installing from the vash15 branch resolved it. The same solution does not seem to work now.

ionic cordova platform add android@8.0.0

cordova platform add android@8.0.0
Using cordova-fetch for cordova-android@8.0.0
Adding android project…
Creating Cordova project for the Android platform:
Path: platforms/android
Package: a.b.chcode.prolear
Name: ABCD
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.0.0
Installing “cordova-plugin-app-preferences” for android
Failed to install ‘cordova-plugin-app-preferences’: CordovaError: Using “requireCordovaModule” to load non-cordova module “path” is not supported. Instead, add this module to your dependencies and use regular “require” to load it.
at Context.requireCordovaModule (/Users/gpaaapps/Documents/code/abcd_mobile/node_modules/cordova-lib/src/hooks/Context.js:57:15)
at module.exports (/Users/gpaaapps/Documents/code/abcd_mobile/plugins/cordova-plugin-app-preferences/bin/before_plugin_install.js:6:14)
at runScriptViaModuleLoader (/Users/gpaaapps/Documents/code/abcd_mobile/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:32)
at runScript (/Users/gpaaapps/Documents/code/abcd_mobile/node_modules/cordova-lib/src/hooks/HooksRunner.js:136:12)
at /Users/gpaaapps/Documents/code/abcd_mobile/node_modules/cordova-lib/src/hooks/HooksRunner.js:108:40
at process._tickCallback (internal/process/next_tick.js:68:7)
Using “requireCordovaModule” to load non-cordova module “path” is not supported. Instead, add this module to your dependencies and use regular “require” to load it.
[ERROR] An error occurred while running subprocess cordova.

    cordova platform add android@8.0.0 exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more
    information.

gpaaapps@MacBook-Pro abcd_mobile % ionic info

Ionic:

Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.5.3
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 8.0.0, ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 19 other plugins)

Utility:

cordova-res : not installed
native-run (update available: 1.2.2) : 1.0.0

System:

ios-sim : 8.0.2
NodeJS : v10.20.1 (/usr/local/bin/node)
npm : 6.14.4
OS : macOS Catalina
Xcode : Xcode 12.0.1 Build version 12A7300