Webstorm + JavaScript ES6 Errors

Hello!
I’m currently working my way through the ES6 Use Destructuring Assignment to Assign Variables from Objects I started using Webstorm but are having issues running the scripts in ES6. They always throw up errors.

a few points:

  • the file is a .es6 file
  • under Languages & Frameworks > JavaScript > ECMAScript 6

Not sure what else I need to do.
Thanks in advance!

/usr/local/bin/node /Users/sunny/Library/Preferences/WebStorm2018.2/scratches/test.js
/Users/sunny/Library/Preferences/WebStorm2018.2/scratches/test.js:1
(function (exports, require, module, __filename, __dirname) { this.autorun( () => this.subscribe('products',
                                                                   ^

TypeError: this.autorun is not a function
    at Object.<anonymous> (/Users/sunny/Library/Preferences/WebStorm2018.2/scratches/test.js:1:68)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

Process finished with exit code 1