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.

Bundlejs error on release build

See original GitHub issue

Note: I’ve gone through other issues but it doesn’t seem like they are getting the same error.

Environment

Environment: OS: macOS High Sierra 10.13.4 Node: 9.11.1 Yarn: Not Found npm: 5.6.0 Watchman: 4.9.1 Xcode: Xcode 9.2 Build version 9C40b Android Studio: Not Found

  • Also using Xcode 9.4

Packages: (wanted => installed) react: ^16.3.1 => 16.3.1 react-native: ^0.55.4 => 0.55.4

Description

For some reason I am getting the following error when building a release version of my application via react-native.

*** Terminating app due to uncaught exception ‘RCTFatalException: Unhandled JS Exception: t.typeof is not a function. (In ‘t.typeof(“function”==typeof Symbol?Symbol.iterator:“@@iterator”)’, ‘t.typeof’ is undefined) (/Users/…/THEAPP.app/main.jsbundle:11)’, reason: 'Unhandled JS Exception: t.typeof is not a function. (In ‘t.typeof("function…’

I have tried the following:

  1. Making bundle by editing the Scheme to be a Release bundle
  2. Export a bundle myself by using the following: react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios

I get the same error for both of these. And of course, this is after I change my AppDelegate.m to the following:

//jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
padupuycommented, Sep 12, 2018

Hi there @bgold0 @vovkasm @codejamninja @ronal2do , I had the same pb and I fix it by replacing the content of my .babelrc file.

Before (with the bug from babelHelpers) :

{ "presets": ["env", "react-native"] }

After (🎉) :

{ "presets": ["react-native"] }
1reaction
Winglonelioncommented, Sep 17, 2018

@padupuy You made my day, bro. I tried hundred configs without success and just remove presets env made my project working perfectly again. It like a dream. :lol:.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack not creating bundle.js or error messages
When running npm run serve , I get Module parse failed: Unexpected token (2:5) You may need an appropriate loader to handle this...
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
Addressing common errors in React Native - LogRocket Blog
Solution 1: Package the bundle correctly. All of your app's JavaScript is bundled into the index.android.bundle file.
Read more >
Development - webpack
For example, if you bundle three source files ( a.js , b.js , and c.js ) into one bundle ( bundle.js ) and...
Read more >
Troubleshooting build errors and crashes - Expo Documentation
Verify that your JavaScript bundles locally ... When you get the Metro encountered an error during a native iOS build, it means Metro...
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