I'm facing an issue on remote development always opening the browser on Server side while I'm developing on client side.
The setup is :
- a project created with create-react-app on my server machine.
- a vscode-server remote ssh setup on the same server
- vscode with remote-ssh plugin on client side
BROWSER=none
setup in .env project (which is working fine starting the project from the server directly).--no-browser
seems to work likeBROWSER=none
The thing is, developing in remote with vscode override the BROWSER
env conditionnaly to a without-browser-env-var
arg seems to be my nemesis.
As far I can investigate I get the process executed in vscode console which seems pass args and it look like that :
Running ssh connection command... /Users/hollypony/.vscode-server/bin/hashcode/bin/code-server --start-server --host=127.0.0.1 --accept-server-license-terms --enable-remote-auto-shutdown --port=0 --telemetry-level off
The main question is: How to stop opening browser on my Server when I start my project through the client ?
Alternative question: There is a way to configure somewhere the --without-browser-env-var
arg and how considering ssh environment ?
Note: I've found that display the content of env.BROWSER that refer to : /Users/hollypony/.vscode-server/bin/helpers/browser.sh
on react-scripts
EDIT:
- react-scripts v5.0.1
- vscode v1.73
- Remote - SSH v0.96.0
- Remote - SSH: Editing Configuration Files v0.84.0
- Remote Explorer v0.2.0
Update 03/03/23
I found a hack editing the
"terminal.integrated.env.${targetServerType-osx for me}
on the Client vscode settings with value :{ "BROWSER": "none" }
This way Im overriding over the override of BROWSER. And as mentionned it's a hack more than a plleasant solution.