Ionic corrupted cannot uninstall ( mac high sierra )

#1

I am using high seirra and trying to install any plugin but fail. i try many step already. reinstall ionic and cordova as well.

I used the commands

npm uninstall -g ionic
npm uninstall -g cordova

npm install -g ionic
npm install -g cordova

I cleared the npm cache as well.

Any help appreciated…

here the ionic info

cli packages: (/Users/.../.nvm/versions/node/v8.9.4/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : not installed

local packages:

    @ionic/app-scripts : not installed
    Cordova Platforms  : none
    Ionic Framework    : not installed

System:

    Node : v8.9.4
    npm  : not installed
    OS   : macOS High Sierra

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

and for npm list -g --depth=0

/Users/.../.nvm/versions/node/v8.9.4/lib
├── @angular/cli@1.6.4
├── cordova@8.0.0
├── ionic@3.19.0
├──  error: ENOENT: no such file or directory, stat '/Users/.../.nvm/versions/node/v8.9.4/lib/node_modules/npm
└── rxjs@5.5.6

npm ERR! error in /Users/.../.nvm/versions/node/v8.9.4/lib/node_modules/npm: ENOENT: no such file or directory, stat '/Users/.../.nvm/versions/node/v8.9.4/lib/node_modules/npm'

npm ERR! peer dep missing: @angular-devkit/schematics@0.0.43, required by @schematics/angular@0.1.12

and for npm uninstall cordova ionic

npm ERR! path /Users/.../.../.../.../node_modules/npm/node_modules/dezalgo/node_modules/asap
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/.../.../.../.../node_modules/npm/node_modules/dezalgo/node_modules/asap' -> '/Users/.../.../.../.../node_modules/npm/node_modules/dezalgo/node_modules/.asap.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent```
#2

remove ionic cordova, delete node_modules, install it back and lastly install ionic cordova back. problem solve

rm -rf node_modules
run npm install 
npm install -g ionic
npm install -g cordova