unknown Statement of type "ForOfStatement"
See original GitHub issueHaving a for .. of
loop in a generator function raise the error :
Error: path/to/file.js: unknown Statement of type "ForOfStatement"
at Emitter.Ep.explodeStatement (/path/to/project/node_modules/babel-plugin-transform-regenerator/lib/emit.js:648:13)
other for .. of
loops compile as expected
babel-plugin-transform-regenerator version : 6.3.26 babel version : 6.3.26 node version : v5.3.0
Issue Analytics
- State:
- Created 8 years ago
- Comments:8
Top Results From Across the Web
unknown Statement of type "ForOfStatement" #1269 - GitHub
I am using Parcel-bundler as an express middleware and cannot get it to build at all. node_modules/parcel-bundler/src/Bundler.js: unknown ...
Read more >How to solve syntax error of d3-array/src/number.js
Error: node_modules/d3-array/src/merge.js: unknown Statement of type "ForOfStatement" for (const array of arrays) { yield* array; } ...
Read more >Upgrade to Babel 7 (API)
In general, we have differentiated the node types with TypeAnnotation for Flow and ... and is replace with the field await in the...
Read more >@babel/types ForOfStatement TypeScript Examples
This page shows TypeScript code examples of @babel/types ForOfStatement. ... https://tc39.es/ecma262/#sec-return-statement let v: unknown; ...
Read more >UNPKG - @babel/standalone
RestElement;\n Statement: t.Statement;\n User: t.Node;\n Var: t.VariableDeclaration;\n}\n\ntype VirtualTypeMapping = readonly (t.Node[\"type\"] | keyof t.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@benjamn is this still relevant? I am encountering this error when using
for..of
in an async function transpiled with thebabel-preset-env
set totarget: {node: "current"}
. The reason is that Node supportsfor..of
natively and thus it does not get transpiled.Should
regenerator
just ignoreForOfStatement
or will that break things?adding
transform-runtime
fixed the issue