Could not determine package name from output when adding custom plugin

After updating to Ionic Cli 6.12.4, I am now getting this error when trying to add a custom plugin:

$ cordova plugins add plugins_src/CloverPaymentConnector
CordovaError: Could not determine package name from output:
removed 1 package, and audited 1901 packages in 5s

5 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
    at getTargetPackageSpecFromNpmInstallOutput (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/index.js:91:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  jse_shortmsg: 'Could not determine package name from output:\n' +
    'removed 1 package, and audited 1901 packages in 5s\n' +
    '\n' +
    '5 packages are looking for funding\n' +
    '  run `npm fund` for details\n' +
    '\n' +
    'found 0 vulnerabilities',
  jse_info: {}
}

Already reinstalled cordova but problem persists. This plugin was working correctly with version 6.12.3 of Ionic CLI.

Any ideas?

ok, problem is caused because current version of cordova is not compatible with latest version of npm:

Cordova doesn’t work with NPM 7 · Issue #859 · apache/cordova-lib (github.com)

Solution was to reinstall previous version of npm:

npm i -g npm@6