Ionic Update available 4.6.0 → 4.7.1 FAILED


I’ve been using Ionic 4.x for a few months now and I just got a notice today to upgrade.

Update available 4.6.0 → 4.7.1
Run npm i -g ionic to update

And I’m getting this error at the end:

npm ERR! path /usr/local/lib/node_modules/ionic/node_modules/esprima/bin/esparse.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ionic/node_modules/esprima/bin/esparse.js'
npm ERR! enoent This is related to npm not being able to find a file.

So I run npm install and after that, and now I can’t use Ionic anymore. I’m totally blocked since we’ve decided to use Ionic 4 for our development. If anybody is having the same issue or got this fixed, please let me know.


I would strongly suggest installing nvm, which allows for much easier management of node installations.

Thanks. Did you mean npm or nvm? I don’t even have nvm on my system.


I’m suggesting that life would be easier if you did.

It would allow you to completely isolate a node/npm “world” for use with Ionic, without having to worry about problems with the main one (which you are using, judging from the /usr/local in the path you posted).

Thanks for your suggestion. I got it to work now after uninstalling node, install nvm and rebuild node-sass. Not sure what was the root cause, but upgrading node and install nvm may help. :grinning:

Installing node v10 corrected this issue.