simondotm / nx-firebase

Firebase plugin for Nx Monorepos
https://www.npmjs.com/package/@simondotm/nx-firebase
MIT License
175 stars 31 forks source link

Nx 17+ terminates tasks with  `ELIFECYCLE  Command failed with exit code 128.` #238

Open simondotm opened 2 months ago

simondotm commented 2 months ago

CTRL+C any Nx running task since upgrading to Nx 17 and I'm seeing this error in the console:

 ELIFECYCLE  Command failed with exit code 128.

image

It also happens in Nx 18.

So I think they've refactored how tasks & processes are managed, and somehow exiting the task runner more aggressively.

This appears to be affecting the Firebase serve executor, since it no longer gets the SIGINT and just bails out, which means the Firebase emulator no longer gets opportunity to shutdown.

Anyone else seeing this?

simondotm commented 1 month ago

This was happening in Node 18, and I tried updating to Node 20 based on a random comment elsewhere, but no difference (yet).

I'm short on ideas for how to fix this, because we have to invoke the custom serve executor from nx task runner, even when spinning up our own process in there, it gets killed without firebase CLI command getting the SIGINT it needs to shutdown the emulator cleanly.

Ideas are very welcome, since it's not great for workflow atm.