Description
Running setupEmulator:<platform> automatically starts the development server as part of the command. However, the command completes with exit code 0 while the dev server continues running in the background.
When the command process is terminated, the dev server does not stop. This creates several issues:
- The dev server keeps running silently in the background.
- System resources continue to be consumed.
- The port remains occupied.
- Developers may not realize a server is still running since they did not explicitly start one.
- Killing all
node processes does not reliably terminate this process.
- The only way to stop it is by manually identifying the port and killing the process via its PID.
This behavior is confusing because setupEmulator:<platform> appears to finish successfully while leaving behind a long-running background process.
Expected Behavior
setupEmulator:<platform> should complete all emulator setup tasks and then exit cleanly.
- It should not automatically start the dev server.
- If serving pages locally requires a dev server, the user should be prompted or instructed to start it manually.
Current Behavior
setupEmulator:<platform> starts the dev server as part of the setup process.
- The command exits successfully but leaves the dev server running in the background.
- The running process is not obvious to the developer and must be manually killed.
Steps to Reproduce
- Run
setupEmulator:<platform>.
- Wait for the command to finish.
- Check running processes or the port used by the dev server.
- Observe that the dev server is still running in the background.
Proposed Solution
Remove the dev server startup from the setupEmulator:<platform> command.
The emulator setup and the dev server should be independent steps:
setupEmulator:<platform> → performs emulator setup only.
- Developers can manually start the dev server if they want to serve pages locally.
Optionally, the command could display a message such as:
If you want to serve pages locally, please start the dev server using <command>.
Impact
- Prevents hidden background processes.
- Avoids port conflicts.
- Reduces developer confusion.
- Gives developers explicit control over when the dev server runs.
Description
Running
setupEmulator:<platform>automatically starts the development server as part of the command. However, the command completes with exit code0while the dev server continues running in the background.When the command process is terminated, the dev server does not stop. This creates several issues:
nodeprocesses does not reliably terminate this process.This behavior is confusing because
setupEmulator:<platform>appears to finish successfully while leaving behind a long-running background process.Expected Behavior
setupEmulator:<platform>should complete all emulator setup tasks and then exit cleanly.Current Behavior
setupEmulator:<platform>starts the dev server as part of the setup process.Steps to Reproduce
setupEmulator:<platform>.Proposed Solution
Remove the dev server startup from the
setupEmulator:<platform>command.The emulator setup and the dev server should be independent steps:
setupEmulator:<platform>→ performs emulator setup only.Optionally, the command could display a message such as:
Impact