Ionic integrations enable capacitor Maximum call stack size exceeded error

On executing the ionic integrations enable capacitor
receiving an error
npm.cmd i --save -E @capacitor/core@latest exited with exit code 1.

and also if I try
npm install @capacitor/core

receiving this error
npm ERR! Maximum call stack size exceeded

Its really annoying if someone could help ?

What does ionic info report?

What do you mean ? There is no more info on the errors.
Here it is more info if it helps:

173 silly resolveWithNewModule xmlbuilder@11.0.1 checking installable status
174 verbose stack RangeError: Maximum call stack size exceeded
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:83:42)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at module.exports.TrackerGroup.finish (C:\Program Files\nodejs\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js:88:13)
174 verbose stack at Function.module.exports.now (C:\Program Files\nodejs\node_modules\npm\lib\install\and-finish-tracker.js:14:11)
174 verbose stack at loadDeps (C:\Program Files\nodejs\node_modules\npm\lib\install\deps.js:520:99)
174 verbose stack at Array. (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
174 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
175 verbose cwd C:\steps
176 verbose Windows_NT 10.0.19043
177 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “i” “-D” “-E” “@capacitor/cli@latest”
178 verbose node v12.21.0
179 verbose npm v6.14.11
180 error Maximum call stack size exceeded
181 verbose exit [ 1, true ]

Its the same error reported here

I mean "you type ionic info" at a prompt in your project directory and report back what it says.

that usually happens when npm install fails (which ionic CLI runs to install Capacitor)

try deleting node_modules folder, package-lock.json file and running npm cache clean --force

Ionic:

Ionic CLI : 6.16.3 (C:\Users\user1\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.3.1
@angular-devkit/build-angular : 0.1002.3
@angular-devkit/schematics : 10.2.3
@angular/cli : 10.2.3
@ionic/angular-toolkit : 2.3.0

Utility:

cordova-res : not installed globally
native-run : 1.4.0

System:

NodeJS : v12.21.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.11
OS : Windows 10

First thing I would do here is to install nvm-windows, to make managing node installations easier (especially without needing whatever Windows calls superuser privileges). Then,

I recommend always using the most recent LTS version of Node.js. As I write this, that’s 14.17.6. See if it handles things better.