-2

When installing angular cli .I am getting this error:

npm ERR! Unexpected end of JSON input while parsing near ยด...,"helper-reflinks":

enter image description here

Can anyone guide me what to do? I will really appreciate your support

Mauricio Gracia Gutierrez
  • 10,288
  • 6
  • 68
  • 99
Saad Aslam
  • 11
  • 1
  • 1
    Duplicate https://stackoverflow.com/questions/51157638/error-installing-angular-cli โ€“ Jacopo Sciampi Jul 03 '18 at 15:00
  • 2
    Possible duplicate of [Error installing Angular Cli](https://stackoverflow.com/questions/51157638/error-installing-angular-cli) โ€“ Makoto Jul 03 '18 at 15:01
  • 1
    Possible duplicate of [NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'](https://stackoverflow.com/questions/47675478/npm-install-errorunexpected-end-of-json-input-while-parsing-near-nt-webpack) โ€“ Mauricio Gracia Gutierrez Oct 28 '19 at 12:35

3 Answers3

2

try uninstalling and re-installing angular cli again,
npm remove @angular/cli
npm i @angular/cli@latest -g

Taranjit Kang
  • 2,510
  • 3
  • 20
  • 40
1

This solved it for me

npm cache clean --force

then run

npm install -g @angular/cli@latest

Taken from NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'

Mauricio Gracia Gutierrez
  • 10,288
  • 6
  • 68
  • 99
1

Clean your cache by tapings using:

npm cache clean --force 

Then install the latest cli using:

npm install -g @angular/cli@latest
N. berouain
  • 1,181
  • 13
  • 17
Abdellatif B
  • 61
  • 1
  • 2