Not Able to Install Angular CLI due to Unexpected end of JSON input while parsing


while installing angular/cli using npm I am getting below error. I even tried reinstalling node.js and tried to install angular cli through below commands

npm install -g @angular/cli

also tried

npm install @angular/cli@latest -g 

but still same error is popping up.

C:\Users\USER>npm install @angular/cli@latest -g
npm ERR! Unexpected end of JSON input while parsing near '...":{"babel-polyfill":"'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2020-10-14T19_32_16_080Z-debug.log

enter image description here


my problem is finally solved – installation of angular/cli successful.

Run the following command in cmd promt :

  1. npm cache verify
    –> run the command in cmd which verify your NPM cached memory.
  2. npm cache clear –force
    –> it will be cleaning your NPM cache memory.
  3. npm install –g @angular/cli@latest
    –> now tried installing with this command
  4. ng –version
    –> to check the installed version of angular.

Thanks to all guys..

Answered By – Praveen L

Answer Checked By – Mildred Charles (AngularFixing Admin)

Leave a Reply

Your email address will not be published.