1

I already have node installed.

enter image description here

Everything is ok, but I don't know why I cannot install angular/cli

My commands: C:\myApp>node -v v8.11.3

C:\myApp>npm -v 5.6.0

C:\myApp>npm install -g @angular/cli npm ERR! Unexpected end of JSON input while parsing near '....1","minimatch":"^3.0'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HamedPC\AppData\Roaming\npm-cache_logs\2018-11-08T13_23_51_111Z-debug.log

I tried npm cache clean --force, but still did not work.

Community
  • 1
  • 1
H Orojloo
  • 11
  • 1

1 Answers1

-1

The latest CLI build is 7.0.4. There might be issues with the package. I have 7.0.3 installed globally on my system which has no such issues. Try installing using the command npm i -g @angular/cli@7.0.3.

If the problem persists further, submit an issue properly to their github.

inthevortex
  • 334
  • 5
  • 20
  • with running npm i -g @angular/cli@7.0.3:npm ERR! Unexpected end of JSON input while parsing near '...ebug":"^2.1.3","denod' – H Orojloo Nov 08 '18 at 14:33
  • Check out the first and second answere [here](https://stackoverflow.com/questions/47675478/npm-install-errorunexpected-end-of-json-input-while-parsing-near-nt-webpack). Also try running the command as `sudo`, if in linux or as `admin` if on windows. – inthevortex Nov 08 '18 at 14:56