# React Native packager doesn't work

**URL:** <https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597>\
**Category:** Question & Answer\
**Tags:** react-native, calabash, ios\
**Created:** [April 28, 2017, 3:00pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597 "2017-04-28T15:00:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![farkob](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@farkob](https://discuss.bitrise.io/u/farkob)\
**Post date:** [April 28, 2017, 3:00pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/1 "2017-04-28T15:00:16Z")

</div>

We use calabash for integration tests on a React Native project on iOS, and can’t use the packager. First even `npm start` wasn’t working so I thought it was a macOS Sierra issue with watchman (known issue) so I used El Capitan and this time `npm start` worked. After that, since it doesn’t continue the build and I changed that to `nohop npm start > /dev/null &`, but calabash still can neither start it’s own packager (fails with an error but continues running the tests) nor connect to the packager running(?) in the background.

Is there a way to make it work? Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 28, 2017, 3:03pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/2 "2017-04-28T15:03:30Z")

</div>

Hey @farkob 👋

Did you try to run it locally on your Mac? The same script I mean, or the build config with our CLI ([https://www.bitrise.io/cli](https://www.bitrise.io/cli))?

---

<div class="post-metadata">

**Author:** ![farkob](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@farkob](https://discuss.bitrise.io/u/farkob)\
**Post date:** [May 5, 2017, 1:56pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/3 "2017-05-05T13:56:33Z")

</div>

I am trying to run it locally right now but I could not set the RSS private key and couldn’t figure out the correct inputs for git-clone step. Anyway so I used my local project folder and I removed everything up to xcode test and calabash steps and now calabash steps throws an error about a version conflict in cucumber which I couldn’t resolve after fiddling with my local versions. But on the Bitrise it runs the tests actually with failing them due to the reason I stated. Maybe I should try it running in a container, but I couldn’t figure out how to add the repo url and private key to the activate-ssh and git clone. Also, xcode-test also has a simulator step which can run packager correctly. So I believe if I resolve the version conflict issue the tests would run fine.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 5, 2017, 2:02pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/4 "2017-05-05T14:02:08Z")

</div>

For local debug did you follow this guide [How to debug your build locally / "It works on my Mac/PC but not on bitrise.io"](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392) ?

It’s quite important to start with a clean git clone - most of these issues are not related to bitrise at all, instead related to something not under version control, or a dependency which’s version is not locked in your project and your local dependency version is not the same what [bitrise.io](http://bitrise.io) gets when it runs the dependency manager (e.g. npm install / pod install / …) to get your project’s dependencies.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 5, 2017, 2:03pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/5 "2017-05-05T14:03:39Z")

</div>

This guide might also help with a base config / layout:

> [@How to build, bundle and test React Native projects on Bitrise](http://discuss.bitrise.io/t/how-to-build-bundle-and-test-react-native-projects-on-bitrise/1096):
>
> Build on iOS and Android platforms Short Summary Building React Native project is basically the same as building for the target platform with a little twist. When you add a new app on [Bitrise.io](http://Bitrise.io) you will see the project scanner will detect iOS and Android projects. This is because the structure React Native uses is the same as in a simple iOS or Android project. And now: The twist React Native’s CLI tool has a bundle command, which will create bundle from your JS files. (index.android.js & inde…

---

<div class="post-metadata">

**Author:** ![farkob](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@farkob](https://discuss.bitrise.io/u/farkob)\
**Post date:** [May 5, 2017, 2:13pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/6 "2017-05-05T14:13:43Z")

</div>

Yeah we have a similar setup that works fine right now. But the problem is in calabash step

I should outline the actual process to give you a little more context.  
React Native when run in debug mode, gets the package from a packager which runs as a separate process. It’s a regular http server which serves a javascript file for the app to consume and runs on port 8081.  
If the app cannot connect to this packager, it shows a red error screen.  
For the calabash tests to run this packager should run and be reached by the app.

Do you have any guesses why the packager is not reachable?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 5, 2017, 2:36pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/7 "2017-05-05T14:36:46Z")

</div>

Not really. Maybe some kind of update? Eg in Calabash? Which works differently, but you might have a different version on your Mac

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 5, 2017, 2:37pm UTC](https://discuss.bitrise.io/t/react-native-packager-doesnt-work/1597/8 "2017-05-05T14:37:45Z")

</div>

> [@farkob](#):
>
> After that, since it doesn’t continue the build and I changed that to nohop npm start \> /dev/null &,

Are you sure that the server is running?
