2

When running a typings command I always get the error:

AppData\Roaming\npm\node_modules\typings\node_modules\strip-bom\index.js:2
module.exports = x => {
                   ^^
SyntaxError: Unexpected token =>
    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.<anonymous> (AppData\Roaming\npm\node_modules\typings\node_modules\typings-core\dist\utils\fs.js:5:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)

So far I tried reinstalling typings (v 2.0.0), npm cache clean and all that, but it doesn't seem to fix it.

user2657943
  • 2,598
  • 5
  • 27
  • 49
  • I have the same issue.. did you manage to find a solution to this? – Inx51 Dec 17 '16 at 22:31
  • 1
    turns out that upgrading my node.js version solved this for me.. node = new version-hell? – Inx51 Dec 17 '16 at 22:51
  • How is running an outdated version of software a "version-hell"? – JJJ Jan 23 '17 at 07:35
  • Possible duplicate of [Node.js support for => ('function' keyword alias)](http://stackoverflow.com/questions/19644341/node-js-support-for-function-keyword-alias) – JJJ Jan 23 '17 at 07:36

2 Answers2

0

Under windows, I got node version 0.12, uninstalled it, reinstalled the versoin 6.9.x. Problem got solved. Thanks.

0

I just install the new version of node from node page, there is no need of uninstalled it first because the binary files are overwritten.

Kimy BF
  • 1,029
  • 3
  • 13
  • 23