Decorate throws `We don't know what to do with this node type.`
See original GitHub issueWhen setting decorate to true, the following error is throw:
someFileHere.js: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?
.babelrc
{
"presets": ["es2015", "stage-0"],
"plugins": [
"syntax-flow",
["flow-runtime", {
"assert": true,
"decorate": true
}],
"transform-flow-strip-types",
"transform-runtime",
"add-module-exports",
"transform-es2015-modules-umd"
]
}
Setting decorators to false fixes the issue
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error: We don't know what to do with this node type. We were ...
I 'm reporting an error I get for every React component exported after I upgraded to @babel/*@^7.0.0-beta.37: ERROR in ./apps/visitor/components/ ...
Read more >"Unexpected Node Type." error spamming console after unity ...
Hey all, I just upgraded our project from 2021.1.2f1 to 2021.2.0f1 and after re-compile (and startup) the log is spammed with the following ......
Read more >escodegen.generate throws Error: Unknown node type
I am able to tokenize the code string but I am getting error generating the code back. I went through multiple samples, Everywhere...
Read more >Flexible Error Handling w/ the Result Class - Khalil Stemmler
Purposefully throwing errors can have several negative side effects to the readability and traceability of your code. In this article, we ...
Read more >Documentation - Decorators - TypeScript
A Decorator is a special kind of declaration that can be attached to a class declaration, method, accessor, property, or parameter. Decorators use...
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 FreeTop 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
Top GitHub Comments
@dprokop thanks for this, I can replicate it and will push a fix today/tomorrow
fixed in
babel-plugin-flow-runtime
v0.1.1