1

Always give an error message when i try to install angular using this npm install -g@angular/cli

PS C:\Users\admin\Desktop\sonal> npm install -g @angular/cli npm ERR! Unexpected end of JSON input while parsing near '...EGIN PGP SIGNATURE---'

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\admin\AppData\Roaming\npm-cache_logs\2020-07-12T09_04_02_173Z-debug.log.

For this we use node version 12.18.0 and npm version 6.14.6.Please help me for solving this error.

1

1 Answer 1

0

step 0: run this command

npm uninstall -g @angular/cli

npm cache clean

step 1: delete this folder: C:\Users%YOUR-USERNAME%\AppData\Roaming\npm

step 2: uninstall Nodejs from Windows

step 3: restart your PC

step 4: install a fresh copy of Nodejs from here:Link

step 5: install the CLI globally

npm install -g @angular/cli@latest

Sign up to request clarification or add additional context in comments.

1 Comment

Thank u for this solution@Jay Parmar.I tried but it not worked for me. I again find the same error.Please suggest any other solution for this problem@ Jay Parmar..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.