Executing npm uninstall -g npm gave me same error

- Uninstall Node.js installed in the system
- Goto c:\Program File\nodejs (default location of the nodejs installation). Remove all contents of the folder manually.
- Install Node.js again.
running npm install @angular/cli -g worked for me.