lukeautry / tsoa-example

An example of tsoa usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on build, node v4.4.2

olegsmetanin opened this issue · comments

npm run build

...

tsoa swagger
/Users/oleg/Develop/2016/github.com/enterprise-react-app/packages/tsoa-example/node_modules/tsoa/dist/cli.js:21
const getConfig = (configPath = 'tsoa.json') => {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3

commented

@olegsmetanin I think this is probably because you're on a version of node that doesn't support const, or ES6 stuff in general. In the package.json, the node.js engine is stated as 6+.

That said, now that TypeScript supports downcompiling async/await, I think we could support earlier versions of Node, I just haven't made those changes yet.

node v6.9.4 is OK, issue is solved.

by the way -
Starting server...
express deprecated res.sendfile: Use res.sendFile instead dist/server.js:11:9