Built stuck at 0.0% while bundling index.ios.js

Viewed 4296

I don't know exactly why but all my react-native projects cannot build anymore today and I'm stuck with a the Bundling of index.ios.js at 0.0%.

I tried a couple of things but all my projects got the same issue.

4 Answers

I tried several things: the above answer, launchctl unload, restart, reinstall... You name it. Here's how I fixed it on MacOS:

TL;DR: Remove brew version and follow official documentation to compile from source. Use flags on configure: --enable-statedir=$HOME/.watchman --without-python --without-pcre

Reasoning: I don't need python bindings. I also suspect some permission issues and thought using my home would be safer than default path.

steps:

  • brew rm watchman
  • (just to be safe) launchctl unload -F ~/Library/LaunchAgents/com.github.facebook.watchman.plist

  • (just to be safe) restart mac

  • git clone https://github.com/facebook/watchman.git
  • cd watchman
  • git checkout v4.9.0 // Prefer lastest version here.
  • brew install autoconf automake libtool // Compilation tools
  • ./autogen.sh
  • ./configure --enable-statedir="$HOME/.watchman" --without-python --without-pcre
  • make // Wait... It'll compile the .o files
  • make install // If it fails try with sudo but it shouldn't.

After make install it should be in your path here: /usr/local/bin/watchman Try to watchman version or something. Try to see if it fixed your problem.

Keep in mind most people have their stuff in /usr/local/var/run/watchman/. Our equivalent is now ~/.watchman/

Let me know if this helps you. :)

run the following command echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

This also may happen in case your node dependencies are not installed, e.g. node-modules/ in .gitignore and repo is freshly-pulled.

In this case, your should do npm install of yarn (in case you are using yarn).

Related