You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On MacOS with iTerm, on the previous version of the CLI, Metro opened in a new tab instead of a new window.
I don't know if I'm alone in this situation, but I found it extremely painful to have so many windows open.
Possible Implementations
After investigation, this is due to a little change in @react-native-community/cli-tools/build/startServerInNewWindow.js:103:
// Old versionreturn_execa().default.sync('open',['-a',terminal,launchPackagerScript],procConfig);// New versionreturn_execa().default.sync('open',['-na',terminal,launchPackagerScript],procConfig);
The last version have -na option instead of -a when running launchPackager.command that force the new window.
If other people are facing the same problem, we may consider putting an environment variable to override these flags, like REACT_LAUNCHPACKAGER_OPTIONS="-a".
For the moment I use patch-package to fix it on my repo.
What do you think about this proposal ?
Reacted by Leonardo Costa, Anders Steiner, Nathan Phillis, Stefan Wrobel, alain ibrahim and Gustavo Pereira
This is really annoying change. Every time I run the app, it opens a new window. I am using iTerm and it used to work just fine previously. Now even with the REACT_LAUNCHPACKAGER_OPTIONS set to -a its not working as expected.
This is really annoying change. Every time I run the app, it opens a new window. I am using iTerm and it used to work just fine previously. Now even with the REACT_LAUNCHPACKAGER_OPTIONS set to -a its not working as expected.
REACT_LAUNCHPACKAGER_OPTIONS isn't an available option, only a proposal I made
Activity
andidev commentedon Aug 17, 2025
This is really annoying and also it lead to another bug since the env variables from the start commands are inherited by the new window.
andidev commentedon Aug 18, 2025
Here is some context about the change
#2628
LaGregance commentedon Aug 18, 2025
That's interesting to know, but it seems like it's more a bug in the Ghostty terminal than a bug in react-native-cli, right?
makarand-codeblaze commentedon Sep 3, 2025
This is really annoying change. Every time I run the app, it opens a new window. I am using iTerm and it used to work just fine previously. Now even with the
REACT_LAUNCHPACKAGER_OPTIONSset to-aits not working as expected.LaGregance commentedon Sep 3, 2025
REACT_LAUNCHPACKAGER_OPTIONS isn't an available option, only a proposal I made
fix: return to less intrusive way of starting server in a new window …
fix: return to less intrusive way of starting server in a new window …
alainib commentedon Nov 20, 2025
any fix ? i get this and it's pretty annoying
LaGregance commentedon Nov 20, 2025
Not officially but if you use patch-package you can use the following patch
@react-native-community+cli-tools+19.1.1.patch:fix: return to less intrusive way of starting server in a new window …