question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decorate throws `We don't know what to do with this node type.`

See original GitHub issue

When 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:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
phpnodecommented, Jan 16, 2017

@dprokop thanks for this, I can replicate it and will push a fix today/tomorrow

0reactions
phpnodecommented, Jan 16, 2017

fixed in babel-plugin-flow-runtime v0.1.1

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found