Reputation: 3911
I am trying to run the server using :
node server/index.js
But I am getting this :
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:902:3
The index .js file is failing on :
db.each("SELECT name FROM sqlite_master WHERE type = 'table'", (err, data) => {
tables.push(data.name);
});
Any idea what may be wrong ?
Upvotes: 0
Views: 34
Reputation: 2922
Try replacing
db.each("SELECT name FROM sqlite_master WHERE type = 'table'", (err, data) => {
tables.push(data.name);});
with
db.each("SELECT name FROM sqlite_master WHERE type = 'table'", function(err, data) {
tables.push(data.name);});
as it seems your node version is not supporting this syntax.
Upvotes: 1