callstack / callstack/haul

release build is not working

Open
#489 8 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
3.7k
Forks
185
PR merge metrics
No merged PRs in 30d

Description

### Current Behavior

I'm currently facing some issue with the latest haul & react native in RELEASE BUILD.
Please find the attached to understand the issue better.

I followed through the documentation and I managed to run the application in DEBUG BUILD.
You can reproduce the issue here: https://github.com/lavaxun/haul-issue.

HOWEVER it's not working well in the release build.
I changed the 'scheme' in xcode to be using 'Release' and clicked the 'Run'.
Screenshot below shows the error.
As you can see the build phase is using CLI_PATH. And it's giving a long list of errors when executing the bundling script during the build phase. (but the app can still be started despite of the build errors)
When I try to use 'fetch' to perform HTTP POST. it shows me 'unsupported bodyinit type' error.

not-working-with-cli_path

Another screenshot below shows the bundling script is working fine in the build phase. but without specifying CLI_PATH.
And there is no problem in using 'fetch' to do HTTP POST.

working-without-cli_path

### Expected Behavior

The RELEASE build should be executed without errors. It should work just like the second screenshot above but with CLI_PATH.

### Haul Configuration (haul.config.js)

```js
import { createWebpackConfig } from "haul";

export default {
webpack: createWebpackConfig(({ platform }) => ({
entry: `./index.js`
}))
};
```

### Your Environment

| software | version
| ---------------- | -------
| Haul | 1.0.0-rc.9
| react-native | 0.57.2
| react-native-navigation | 1.1.491
| node | 8.11.4
| yarn | 1.10.1

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.