babel / babel/babel-loader

$export is not a function. (In '$export($export.S + $export.F * !require(896 ), 'Object', { defineProperty: require(892 ).f })', '$export' is an instance of Object

Open
#778 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.8k
Forks
456
Avg merge
9h 19m
Merged PRs (30d)
2

Description

when running the react native app on release (after bundling) I am facing a crash with following stack

```
$export is not a function. (In '$export($export.S + $export.F * !require(896 ), 'Object', { defineProperty: require(892 ).f })', '$export' is an instance of Object)
2019-03-26 16:24:15.825046+0530 Default[30104:5811597] Unhandled JS Exception: $export is not a function. (In '$export($export.S + $export.F * !require(896 ), 'Object', { defineProperty: require(892 ).f })', '$export' is an instance of Object)
2019-03-26 16:24:15.828938+0530 Default[30104:5811591] [] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused]
2019-03-26 16:24:15.830763+0530 Default[30104:5811591] [] nw_socket_handle_socket_event [C3.2:1] Socket SO_ERROR [61: Connection refused]
2019-03-26 16:24:15.831784+0530 Default[30104:5811592] Module AppRegistry is not a registered callable module (calling runApplication)
2019-03-26 16:24:15.832275+0530 Default[30104:5811572] [] nw_connection_get_connected_socket [C3] Client called nw_connection_get_connected_socket on unconnected nw_connection
2019-03-26 16:24:15.832609+0530 Default[30104:5811572] TCP Conn 0x600003f2e940 Failed : error 0:61 [61]
2019-03-26 16:24:15.845630+0530 Default[30104:5811597] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: $export is not a function. (In '$export($export.S + $export.F * !require(896 ), 'Object', { defineProperty: require(892 ).f })', '$export' is an instance of Object)', reason: 'Unhandled JS Exception: $export is not a function. (In '$export($export.S +..., stack:
```

**Babel Core Version**:
"babel-core": "^6.24.1",

My Babel RC
```json
{
"presets": [
"react",
"react-native"
],
"plugins": [
"transform-class-properties",
"add-module-exports",
"transform-decorators-legacy",
"transform-flow-strip-types",
"transform-exponentiation-operator"
]
}
```

**Please tell us about your environment:**
react native

Current behavior:
app crashing on launching the release bundle .. but in debug it works fine

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.