Error when updating to Ionic CLI 3.15.0


#1

Hi I am trying to update the Ionic CLI to 3.15.0 and I get this error

? The Ionic CLI has an update available (3.14.0 => 3.15.0)! Would you like to install it? Yes

npm i -g ionic@latest
× Running command - failed!
Error
at ShellException.Exception (C:\Users\Dani\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\lib\errors.js:8:23)
at ShellException (C:\Users\Dani\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\lib\errors.js:26:9)
at ChildProcess.p.on.code (C:\Users\Dani\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\lib\utils\shell.js:68:28)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at ChildProcess.cp.emit (C:\Users\Dani\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:899:16)
at Socket. (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)

What is the problem here?


#2

One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.


#3

thank you
that worked!!