Error installing upgrade (Use of const in strict mode)
Closed this issue · 2 comments
Below is what I receive when running the commands in an Administrator Command Prompt:
C:\WINDOWS\system32>n> pm` i> nstall --global --p> roduction npm-windows-up> grade>
npm WARN engine npm-w> indow> s-upgrade@4.0.1: wa> nted: {"node":">= 4.0.0"> } (cu> rrent: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine strin> g-wid> th@2.0.0: wanted: {> "node":">=4"} (current: > {"nod> e":"0.12.2","npm":"2.7.4"})
npm WARN engine cli-c> ursor> @2.1.0: wanted: {"n> ode":">=4"} (current: {"> node"> :"0.12.2","npm":"2.7.4"})
npm WARN engine figur> es@2.> 0.0: wanted: {"node> ":">=4"} (current: {"nod> e":"0> .12.2","npm":"2.7.4"})
npm WARN engine is-fu> llwid> th-code-point@2.0.0> : wanted: {"node":">=4"}> (cur> rent: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine resto> re-cu> rsor@2.0.0: wanted:> {"node":">=4"} (current> : {"n> ode":"0.12.2","npm":"2.7.4"})
npm WARN engine oneti> me@2.> 0.1: wanted: {"node> ":">=4"} (current: {"nod> e":"0> .12.2","npm":"2.7.4"})
npm WARN engine mimic> -fn@1> .1.0: wanted: {"nod> e":">=4"} (current: {"no> de":"> 0.12.2","npm":"2.7.4"})
C:\Users\user1\AppDat> a\Roa> ming\npm\npm-window> s-upgrade -> C:\Users\us> er1\A> ppData\Roaming\npm\node_modules\npm-windows-upgrade\bin\npm-windows-upgrade.js
npm-windows-upgrade@4> .0.1 > C:\Users\user1\AppD> ata\Roaming\npm\node_mod> ules> npm-windows-upgrade
├── cli-spinner@0.2.6>
├── debug@2.6.6 (ms@0> .7.3)
├── commander@2.9.0 (> graceful-readlink@1.0.1)
├── chalk@1.1.3 (esca> pe-string-regexp@1.0.5, supports-color@2.0.0, ansi-styles@2.2.1, has-ansi@2.0.0, strip-ansi@3.0.1)
├── prompt@1.0.0 (rev> alidator@0.1.8, colors@1.1.2, pkginfo@0.4.0, read@1.0.7, winston@2.1.1, utile@0.3.0)
├── regenerator-runti> me-only@0.8.38 (promise@6.1.0, es6-symbol@2.0.1)
├── inquirer@3.0.6 (a> nsi-escapes@1.4.0, through@2.3.8, strip-ansi@3.0.1, figures@2.0.0, string-width@2.0.0, cli-width@2.1.0, run-async@2.3.0, > mute-stream@0.0.7, ex> ternal-editor@2.0.1, cli-cursor@2.1.0, lodash@4.17.4, rx@4.1.0)>
└── babel-polyfill@6.> 23.0 (regenerator-runtime@0.10.5, babel-runtime@6.23.0, core-js> @2.4.1)>C:\WINDOWS\system32>npm-windows-upgrade
C:\Users\user1\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\node_modules\figures\index.js:2
const escapeStringRegexp = require('escape-string-regexp');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Users\user1\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\lib\objects\separator.js:3:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)C:\WINDOWS\system32>npm-windows-upgrade --npm-version latest
C:\Users\user1\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\node_modules\figures\index.js:2
const escapeStringRegexp = require('escape-string-regexp');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Users\user1\AppData\Roaming\npm\node_modules\npm-windows-upgrade\node_modules\inquirer\lib\objects\separator.js:3:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
It's right there in the output, first line:
npm WARN engine npm-w> indow> s-upgrade@4.0.1: wa> nted: {"node":">= 4.0.0"> } (current: {"node":"0.12.2","npm":"2.7.4"})
Update Node and things will work!
Thanks! I'm new to Node. I thought NPM would update the Node.js version.