Create new Angular 5 project:
node version : 8.9.2
npm version : 5.5.1
My Command is 'npm install -g @angular/cli'
the Error is
npm ERR! Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'
npm ERR! A complete log of this run can be found in: C:\Users\Aashitec\AppData\Roaming\npm-cache_logs\2017-12-06T13_10_10_729Z-debug.log
the error log is http://www.aashitechno.in/2017-12-06T13_10_10_729Z-debug.log
npm cache clean --force worked for me
Error Resolved :
$ npm install -g gulp npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm ERR! Unexpected end of JSON input while parsing near '.../RGs88STtAtiMP3tCiNdU'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\admin\AppData\Roaming\npm-cache_logs\2018-11-20T07_38_56_733Z-debug.log
this solved it npm cache clean --force
If
doesn't work try
It's error from your npm....
So unistall node and install it again.
It works....
PS: After installing node again, install angular cli globally.
then
worked for me
Npm uses Cache for downloading new packages for you. You need to clear your npm cache. use following command to clean :
then normally use your npm install command e.g.