Error: We don't know what to do with this node type .....
See original GitHub issueSince this is a legacy/maintain old functionality plugin, I’m just reporting this, I realise it may not be worth fixing, the plugin is great anyway and has saved me a lot of trouble 😃
The following (stripped down a bit) works:
import CSSModules from 'react-css-modules' ;
import styles from './accordion.css' ;
export function layoutAccordion (Header, Content) {
class __Accordion extends React.Component {
....
}
return CSSModules(__Accordion, styles) ;
}
but the decorated version doesn’t:
import CSSModules from 'react-css-modules' ;
import styles from './accordion.css' ;
export function layoutAccordion (Header, Content) {
@CSSModules(styles)
class __Accordion extends React.Component {
....
}
return __Accordion
}
The full error:
Error: app/layout/accordion.js: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?
at NodePath.insertBefore (/usr/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/modification.js:62:13)
at NodePath.unshiftContainer (/usr/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/modification.js:254:15)
at Scope.push (/usr/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/scope/index.js:1031:41)
at Scope.generateDeclaredUidIdentifier (/usr/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/scope/index.js:308:10)
at /home/mike/applify2/node_modules/babel-plugin-transform-decorators-legacy/lib/index.js:27:56
at Array.map (native)
at applyEnsureOrdering (/home/mike/applify2/node_modules/babel-plugin-transform-decorators-legacy/lib/index.js:25:53)
at PluginPass.ClassExpression (/home/mike/applify2/node_modules/babel-plugin-transform-decorators-legacy/lib/index.js:223:38)
at newFn (/usr/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/visitors.js:278:19)
at NodePath._call (/usr/lib/node_modules/babel-cli/node_modules/babel-core/node_modules/babel-traverse/lib/path/context.js:76:18)
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (4 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 >Error in Reprocessing IDOCS - SAP Community
I am facing a problem while reprocessing an inbound IDOC of type DESADV. I have few I which have gone into error. The...
Read more >AWS ParallelCluster Troubleshooting
Check the clustermgtd ( /var/log/parallelcluster/clustermgtd ) log to see if instances were launched for the node. If they weren't launched, there should be ......
Read more >HTML DOM Element nodeType Property - W3Schools
The nodeType property returns the node type, as a number, of the specified node. If the node is an element node, the nodeType...
Read more >Errors | Node.js v19.3.0 Documentation
Errors #. Applications running in Node.js will generally experience four categories of errors: Standard JavaScript errors such as <EvalError>, <SyntaxError>, ...
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
This sounds like an instance of https://phabricator.babeljs.io/T3051, if you update your version of
babel-traverse
you should be all set.@loganfsmyth perhaps we should tell npm@3.3.4 to behave that way 😁, at least on my system, that is.