Closed aurbina83 closed 7 years ago
I was able to bypass this issue by adding nonPersistant to the app.json
{
"expo": {
"sdkVersion": "20.0.0",
"packagerOpts": {
"nonPersistent": "--nonPersistent"
}
}
}
Thank you so much for sharing.
Should this be included in the project readme for setup? I can confirm that on a new CRNA project, setup fails without this option in app.json
(with Travis CI atleast).
For future googlers who came upon this problem... We tried the nonPersistent
configuration options (both "nonPersistent": "--nonPersistent" and "nonPersistent": true) in
packagerOpts` but none of them worked.
Try this: echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Long version
We tried the nonPersistent
configuration options in packagerOpts
but none of them worked.
The ENOSPC
error code was critical in solving the problem. It was fixed with this line:
echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
inotify
is the system that watchman
(a file watcher made by Facebook) uses, and watchman
is used by Expo. It appears for Travis we would hit the limit of watches and report we had no more space, but actually we just ran out of file descriptors. The line above increases that amount. More here. You could also probably try installing watchman
, but that seemed pretty difficult to do on Ubuntu and the above command worked for us so whatever.
In our particular case, we were using default Travis builds, which it turns out runs on Ubuntu 14. It didn't particularly like the command above, so we switched to using Ubuntu 16 (Xenial) and had to enable sudo
mode. So, for Travis folks, here's the salient details in our .travis.yml
file:
dist: xenial
# We needed to specify PostgreSQL 10 once we switched to Ubuntu 16
# you might need this as well
addons:
postgresql: "10"
# then add the script however you want
We also noticed that it would choke when we used the &&
with the command, so we split it into two separate operations:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Hope this is helpful to other people!
All of my builds fail with CircleCI at
I'm guessing because of the watch command? Here is the full log.