Hey Guys !!
After a long time I updated npm and node on my machine and when I tried to update node post npm upgrade ran into the below error.
C:\Users\ashishsh>node -v
v4.4.4
C:\Users\ashishsh>npm -v
C:\Users\ashishsh\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:85
let notifier = require('update-notifier')({pkg})
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet sup
ported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
C:\Users\ashishsh>
On further reading I found on the below link
https://github.com/npm/npm/issues/20425
"We dropped support for
After a long time I updated npm and node on my machine and when I tried to update node post npm upgrade ran into the below error.
C:\Users\ashishsh>node -v
v4.4.4
C:\Users\ashishsh>npm -v
C:\Users\ashishsh\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:85
let notifier = require('update-notifier')({pkg})
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet sup
ported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
C:\Users\ashishsh>
On further reading I found on the below link
https://github.com/npm/npm/issues/20425
"We dropped support for
node@4
as part of npm@6
, as one of its breaking changes (see the release notes). This is as @KenanY says -- because node@4
has dropped off its maintenance window and is no longer supported by Node Core. We routinely drop support for node versions that are no longer supported by Node Core with the next semver-major npm release after the most recent Node EOL."