Closed sibelius closed 6 years ago
It's intentional, because native async function (node >= v7.6) is faster than which compiled by regenerator. But maybe we should somehow support node < 7.6.
What would be the workaround for this? Is it possible to compile it in babel for node6 support?
maybe babel-preset-env could help us on this
is there an option to transpile from node_modules with babel as well?
We are running into this same error message trying to set up koa-graphql with karma+jasmine and typescript.
TS is configured to support ES2017, but it seems that no amount of configuration tweaking is getting us around this error.
Versions: Node: 8.x Typescript: 2.6.2 koa-graphql: 0.7.3 karma: 2.0 karma-typescript: 3.0.11
31 01 2018 15:12:40.482:ERROR [source-reader.karma-typescript]: Error parsing code: Unexpected token (41:15)
in .../node_modules/koa-graphql/dist/index.js
at line 41, column 15:
... function middleware(ctx) {
var req = ctx.req;
...
Use node 8
We are using node 8...
in koa-graphql 0.7.0, the compiled version has
async syntax
we are using node 6.10.0 LTS (https://github.com/nodejs/LTS)