bundling failed: TypeError: Property body[10] of BlockStatement expected node to be of a type ["Statement"] but instead got "Noop"
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior? I recently upgraded to react-native@0.52.0 with metro@0.24.3 and I can no longer deliver bundles to iOS or Android.
This repo exhibits the issue: https://github.com/DaKaZ/metro-test-app
error: bundling failed: TypeError: Property body[10] of BlockStatement expected node to be of a type ["Statement"] but instead got "Noop"
at validate (~/client/node_modules/babel-types/lib/definitions/index.js:109:13)
at validator (~/client/node_modules/babel-types/lib/definitions/index.js:57:7)
at Object.validate (~/client/node_modules/babel-types/lib/definitions/index.js:190:10)
at validate (~/client/node_modules/babel-types/lib/index.js:505:9)
at Object.builder (~/client/node_modules/babel-types/lib/index.js:466:7)
at functionFromProgram (~/client/node_modules/metro/src/ModuleGraph/worker/JsFileWrapping.js:48:5)
at Object.wrapModule (~/client/node_modules/metro/src/ModuleGraph/worker/JsFileWrapping.js:25:19)
at postTransform (~/client/node_modules/metro/src/JSTransformer/worker/index.js:140:33)
at Object.transformCode [as transform] (~/client/node_modules/metro/src/JSTransformer/worker/index.js:220:17)
What is the expected behavior? The bundle should be compiled and delivered to the client
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system. I am running on macOS 10.12.6, node 9.2.1, yarn 1.32 and npm 5.6.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Property body[41] of BlockStatement expected node to be of a ...
This appears to be a bug with 7.15.0 of Babel which they are making a E2E React native regression test for. Updated answer....
Read more >Drastically Faster Bundling in React Native | by Evan Bacon
When you create a Node project, whether it uses React DOM, React Native, or another library/framework, you'll have a bunch of files using ......
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
combine our scripts,; remove unused code,; transpile it to work with older browsers,; support the use of Node modules in the browser,; work...
Read more >TypeError: Cannot read property 'bindings' of null-babel.js
Coding example for the question error: bundling failed: TypeError: Cannot read property 'bindings' of null-babel.js.
Read more >Comparing the New Generation of Build Tools - CSS-Tricks
Whether we use webpack, Rollup, or Parcel for a development server, the tool bundles our entire codebase from our source code and a...
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
Do you mean your project’s top-level
.babelrc
? I’m getting this error (or virtually the same), and for me, deleting the project.babelrc
is not an option. If you mean some other.babelrc
, what? where?Just delete the .bablerc file.