1

I ran

nvm install 0.11.13
node -v returns 0.11.13

Yet when I try to run something like:

var test = [1,2,3,4,5,6,7];
test.map(item => item);

node --harmony test.js

I get

/root/test.js:3
test.map(item => item);
               ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
root@Meteor:~# 

Not sure what I'm doing wrong here.

Also:

node -e 'console.log(process.versions.v8);'
returns 3.26.33
Datsik
  • 14,453
  • 14
  • 80
  • 121

0 Answers0