[babel-plugin-flow-runtime] cannot read .name of null
See original GitHub issueusing default plugin config (flow-runtime
), or as object with the defaults explicitly specified ('assert': true, 'decorate': true
…)
Cannot read property 'name' of null
at converters.FunctionTypeParam (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:539:29)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at /project/node_modules/babel-plugin-flow-runtime/lib/convert.js:512:12
at Array.map (native)
at converters.FunctionTypeAnnotation (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:511:62)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at converters.ObjectTypeProperty (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:498:15)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at /project/node_modules/babel-plugin-flow-runtime/lib/convert.js:488:12
at Array.map (native)
at converters.ObjectTypeAnnotation (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:487:114)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at converters.TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:304:14)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/transformVisitors.js:69:47)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/project/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:40:11)
at /project/node_modules/babel-plugin-flow-runtime/lib/convert.js:512:12
at Array.map (native)
at converters.FunctionTypeAnnotation (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:511:62)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at converters.ObjectTypeProperty (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:498:15)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at /project/node_modules/babel-plugin-flow-runtime/lib/convert.js:488:12
at Array.map (native)
at converters.ObjectTypeAnnotation (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:487:114)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at converters.TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:304:14)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/transformVisitors.js:69:47)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/project/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/project/node_modules/babel-traverse/lib/index.js:79:12)
at NodePath.traverse (/project/node_modules/babel-traverse/lib/path/index.js:144:25)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:40:11)
at converters.ObjectTypeProperty (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:498:15)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at /project/node_modules/babel-plugin-flow-runtime/lib/convert.js:488:12
at Array.map (native)
at converters.ObjectTypeAnnotation (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:487:114)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at converters.TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:304:14)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/transformVisitors.js:69:47)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/project/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/project/node_modules/babel-traverse/lib/index.js:79:12)
at NodePath.traverse (/project/node_modules/babel-traverse/lib/path/index.js:144:25)
at PluginPass.Program (/project/node_modules/babel-plugin-flow-runtime/lib/index.js:20:14)
at newFn (/project/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:40:11)
at /project/node_modules/babel-plugin-flow-runtime/lib/convert.js:488:12
at Array.map (native)
at converters.ObjectTypeAnnotation (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:487:114)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at converters.TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:304:14)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/transformVisitors.js:69:47)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/project/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/project/node_modules/babel-traverse/lib/index.js:79:12)
at NodePath.traverse (/project/node_modules/babel-traverse/lib/path/index.js:144:25)
at PluginPass.Program (/project/node_modules/babel-plugin-flow-runtime/lib/index.js:20:14)
at newFn (/project/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:40:11)
at converters.TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:304:14)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:38:12)
at TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/transformVisitors.js:69:47)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/project/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/project/node_modules/babel-traverse/lib/index.js:79:12)
at NodePath.traverse (/project/node_modules/babel-traverse/lib/path/index.js:144:25)
at PluginPass.Program (/project/node_modules/babel-plugin-flow-runtime/lib/index.js:20:14)
at newFn (/project/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/project/node_modules/babel-traverse/lib/context.js:108:19)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:192:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at convert (/project/node_modules/babel-plugin-flow-runtime/lib/convert.js:40:11)
at TypeAlias (/project/node_modules/babel-plugin-flow-runtime/lib/transformVisitors.js:69:47)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/project/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/project/node_modules/babel-traverse/lib/index.js:79:12)
at NodePath.traverse (/project/node_modules/babel-traverse/lib/path/index.js:144:25)
at PluginPass.Program (/project/node_modules/babel-plugin-flow-runtime/lib/index.js:20:14)
at newFn (/project/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/project/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/project/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/project/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/project/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/project/node_modules/babel-traverse/lib/context.js:108:19)
at TraversalContext.visit (/project/node_modules/babel-traverse/lib/context.js:192:19)
at Function.traverse.node (/project/node_modules/babel-traverse/lib/index.js:114:17)
at traverse (/project/node_modules/babel-traverse/lib/index.js:79:12)
at File.transform (/project/node_modules/babel-core/lib/transformation/file/index.js:558:35)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Cannot read property 'name' of null · Issue #10462 - GitHub
Hi,. I just want to ask if how can i fix this issue Cannot read property 'name' of null? ... "babel-plugin-transform-inline-environment-variables" ...
Read more >Options - Babel.js
If passing options via @babel/cli you'll need to kebab-case the names. i.e. ... "preset-" instead of "plugin-", and presets cannot be instances of...
Read more >babel-plugin-flow-runtime - npm
A babel plugin which transforms Flow annotations into Type instances available at runtime, and optionally checks values against those types.
Read more >How to avoid 'cannot read property of undefined' errors?
The error is probably a regular Javascript exception, so try the try..catch statement. That said, an array that contains wildly heterogenous ...
Read more >Babel - Storybook
Storybook's webpack config by default sets up Babel for ES6 transpiling. ... Check out our source to learn more about these plugins.
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
fixed in v0.0.4
I get this error too, and I narrowed it down to anywhere where my code does a default export of an anonymous function or class, or directly exports an arrow function. I went through all my code making sure everything has a proper name and now it no longer throws that error during compilation. It’s a common pattern for small Stateless React Components to just export an anonymous arrow function directly, so I think this bug should be fixed.