# Updating Ionic and cordova not working

**URL:** <https://forum.ionicframework.com/t/updating-ionic-and-cordova-not-working/91104>\
**Category:** ionic-v3\
**Created:** [May 20, 2017, 11:23pm UTC](https://forum.ionicframework.com/t/updating-ionic-and-cordova-not-working/91104 "2017-05-20T23:23:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philipgriffin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/philipgriffin/32/110462_2.png) [@philipgriffin](https://forum.ionicframework.com/u/philipgriffin)\
**Post date:** [May 20, 2017, 11:23pm UTC](https://forum.ionicframework.com/t/updating-ionic-and-cordova-not-working/91104/1 "2017-05-20T23:23:31Z")

</div>

I have tried updating Ionic and Cordova using `npm install -g cordova ionic`

The install seems to work but now any Ionic command I run gives me this error

```auto
C:\Users\XXX\AppData\Roaming\npm\node_modules\ionic\dist\index.js:24
        const [xcode, iosDeploy, iosSim,] = yield Promise.all([
              ^

SyntaxError: Unexpected token [
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (C:\Users\Phil\AppData\Roaming\npm\node_modules\ionic\bin\ionic:8:11)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)

```

I have tried updating npm and I am on 4.6.1 and tried reinstalling both again but still receive the error when I type any ionic command. Example `ionic info`

I’m on windows.

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 21, 2017, 12:15am UTC](https://forum.ionicframework.com/t/updating-ionic-and-cordova-not-working/91104/2 "2017-05-21T00:15:17Z")

</div>

What version of nodejs itself do you have?

---

<div class="post-metadata">

**Author:** ![philipgriffin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/philipgriffin/32/110462_2.png) [@philipgriffin](https://forum.ionicframework.com/u/philipgriffin)\
**Post date:** [May 21, 2017, 6:12pm UTC](https://forum.ionicframework.com/t/updating-ionic-and-cordova-not-working/91104/3 "2017-05-21T18:12:22Z")

</div>

I should have included that, it’s 4.2.1

---

<div class="post-metadata">

**Author:** ![philipgriffin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/philipgriffin/32/110462_2.png) [@philipgriffin](https://forum.ionicframework.com/u/philipgriffin)\
**Post date:** [May 21, 2017, 6:16pm UTC](https://forum.ionicframework.com/t/updating-ionic-and-cordova-not-working/91104/4 "2017-05-21T18:16:28Z")

</div>

@rapropos Yeah, you’re right - it was my nodejs version not npm version that was the issue. Thanks

Updating to nodejs v6.10.3 solved the issue
