Ionic failed to install with errors

Am unable to re-install ionic after i uninstall it. when i run " npm install -g ionic" i get the following error

:\Users\chijioke>npm install -g ionic
pm WARN deprecated superagent@4.1.0: Please note that v5.0.1+ of superagent rem
ves User-Agent header by default, therefore you may need to add it yourself (e.
. GitHub blocks requests without a User-Agent header). This notice will go awa
with v5.0.2+ once it is released.
pm ERR! Unexpected end of JSON input while parsing near ‘…},“dist”:{"integrit
"’

pm ERR! A complete log of this run can be found in:
pm ERR! C:\Users\chijioke\AppData\Roaming\npm-cache_logs\2019-07-06T05_13_
9_102Z-debug.log

good afternoon!
i reslov this problem, try to update npm
sudo npm i -g npm
work for me

1 Like

thanks this solve the error for me to


darkhatglass

Jul 19

good afternoon!
i reslov this problem, try to update npm
sudo npm i -g npm
work for me

Hi, update npm works for me too. But I had to use the “sudo”

  • Deepin OS v 15.8

A much better idea IMHO is to install nvm. There’s never any reason to run npm or anything Ionic under sudo.