When I am running this command,
npm install -g @angular/cli
I am getting this error,
npm ERR! Unexpected end of JSON input while parsing near '...npackedSize":87169,"n' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Krishanu\AppData\Roaming\npm-cache\_logs2018円-08-26T09_25_38_336Z-debug.log
I am on a windows system. Thing is that this was working on the linux a day before, now on linux i cannot create any app,
ng new ngapp
this command is showing the same error. I tried switching to a different network, but not working. I also tried updating the node and npm.
I am new to angular programming and I have no idea what went wrong.
SiddAjmera
39.6k7 gold badges78 silver badges114 bronze badges
2 Answers 2
This could be due to the cache, try the following,
npm cache clean --force
and then do
ng new app
answered Aug 26, 2018 at 9:37
Sajeetharan
223k65 gold badges370 silver badges410 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
use => npm update --save with administrator permission
answered Aug 26, 2018 at 9:45
Alireza Khajavi
1381 silver badge10 bronze badges
Comments
lang-js
—verboseflag and give the output here