Yes this question was asked before but I couldnt find any solution for me.
So Ive just bought a new VPS (Ubuntu 14.04) to develope on since I dont want to work on my Main VPS anymore.
Ive copy pasted every file from my Main VPS (where everything is working) to my new VPS, installed everything and now wanted to start my nodejs app.
However Im getting the following error:
async function helpme()
^^^^^^^^
SyntaxError: Unexpected token function
My code:
var async = require('async');
async function helpme()
{
console.log('Thanks for helping!');
}
The helpme() function is obviously just a test function so I dont need to copy paste and show you my full function where Im facing the same problem. Basically, this error happens everywhere Im using async, so it somehow needs to be broke but I have no idea.
Ive already installed async multiple times (npm async) but I cant find a way to fix it.
Any idea why that error is happening?
Thanks in advance!