When Creating a new Angular 5 project:
node version: 8.9.2
npm version: 5.5.1
My Command is
npm install -g @angular/cli
I solve that with
First delete package-lock.json
npm cache clean --force
then update npm
npm i npm@latest -g
then use npm install command
npm install
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
I use Windows and removed all the files that were listed below and my problem was solved C:\Users{{your-username}}\AppData\Roaming\npm-cache
It's error from your npm....
So unistall node and install it again.
It works....
PS: After installing node again, install angular cli globally.
npm install -g @angular/cli@latest
I solve that with
npm cache clean --force
then update npm
npm i npm@latest -g
then normally use your npm install command
npm install