0
我尝试使用运行服务器:无法使用节点服务器/ index.js重新启动我的服务器
node server/index.js
但我得到这个:
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
索引.js文件是不及格:
db.each("SELECT name FROM sqlite_master WHERE type = 'table'", (err, data) => {
tables.push(data.name);
});
任何想法可能是什么错?
您使用哪个节点版本? –
[Node 4.x及更高版本支持箭头功能。](http://node.green/#arrow-functions)看起来您可能正在使用旧版本。 –