0

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\_logs\2018-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.

1
  • Try —verbose flag and give the output here Commented Aug 26, 2018 at 9:38

2 Answers 2

2

This could be due to the cache, try the following,

npm cache clean --force

and then do

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

Comments

1

use => npm update --save with administrator permission

Comments

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.