Expo builds locally, won't publish


I have my un-ejected expo app up and running and I’ve managed to build and run it successfully locally on both android and iOS without errors. However, when I try to publish the app I get the unable to resolve module error.

Here’s the full error:

[exp] Failed building JavaScript bundle.
[exp] Unable to resolve module `BikeShare/theme/components` from `/Users/gdaunton/Projects/BikeShare/App.js`: Module does not exist in the module map
[exp] This might be related to https://github.com/facebook/react-native/issues/4968
[exp] To resolve try the following:
[exp]   1. Clear watchman watches: `watchman watch-del-all`.
[exp]   2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
[exp]   3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
[exp] Packager URL http://localhost:19001/node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&assetPlugin=/Users/gdaunton/Projects/BikeShare/node_modules/expo/tools/hashAssetFiles&platform=ios returned unexpected code 500. Please open your project in the Expo app and see if there are any errors. Also scroll up and make sure there were no errors or warnings when opening your project.

Basically I have a a setup like this:

 - static
   - js
     - theme
       - components
         - index.js
  - App.js

and a .babelrc with:

["module-alias", [
  { "src": "./static/js", "expose": "BikeShare" }