LBBO / netflix-migrate

A command-line tool to migrate data to and from Netflix profiles
MIT License
266 stars 32 forks source link

SyntaxError #33

Closed MuhamedFathy closed 5 years ago

MuhamedFathy commented 5 years ago

I am trying to use this script but it's throws this exception when I use --export

/usr/local/lib/node_modules/netflix-migrate/index.js:63 ...args ^^^ SyntaxError: Unexpected token ... at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9)

LBBO commented 5 years ago

What is your node version? My assumption is that you are running on an old version (probably lower than 6, based on a quick Google search) which is not supported.

MuhamedFathy commented 5 years ago

Version 6.9.0

LBBO commented 5 years ago

Yup, I get the same error when running the script on node v6.9.0. I did some more searching and according to this website the object spread operator has only been available since node version 8.6.0 (or 8.2.1, but with a flag). I accidentally searched for the wrong operater earlier.

Please try installing a newer version of node or use Babel to compile the code to be compatible with your node version.

MuhamedFathy commented 5 years ago

I have updated node to LTS v10.16.0 from this site "https://nodejs.org/en/" and the script now working.