Angular cli 6 installation error
Angular cli 6 installation error
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:UsersKrishanuAppDataRoamingnpm-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
.
node
npm
I am new to angular programming and I have no idea what went wrong.
—verbose
2 Answers
2
This could be due to the cache, try the following,
npm cache clean --force
and then do
ng new app
use => npm update --save with administrator permission
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Try
—verbose
flag and give the output here– smnbbrv
Aug 26 at 9:38