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.

bundling failed: TypeError: Property body[10] of BlockStatement expected node to be of a type ["Statement"] but instead got "Noop"

See original GitHub issue

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

github_iconTop GitHub Comments

2reactions
haggholmcommented, Jan 31, 2018

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?

1reaction
DaKaZcommented, Jan 28, 2018

Just delete the .bablerc file.

Read more comments on GitHub >

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

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