Here is my Node.js script: pDownload('http://serv/file', 'localfile') .then( ()=> console.log('downloaded file no issues...')) .catch( e => console.error('error while dow
Solution 1:
The version of V8 in Node 0.10 doesn't support arrow functions.
You can fix it by either:
Using something like Babel to compile your code to ES5
Or using a more recent version of Node, like 5.x
Doing with arrow functions
(Thanks James Allardice)
Share
Post a Comment
for "Es6 Giving Syntaxerror: Unexpected Token )"
Post a Comment for "Es6 Giving Syntaxerror: Unexpected Token )"