text: Title: Should not try to get_node_path() if SSR mode is disabled.
  Body: ### Describe the bug
  
  In Gradio code, the lines https://github.com/gradio-app/gradio/blob/54fd90703e74bd793668dda62fd87c4ef2cfff03/gradio/blocks.py#L2560 and https://github.com/gradio-app/gradio/blob/54fd90703e74bd793668dda62fd87c4ef2cfff03/gradio/routes.py#L1737 call `get_node_path()` prematurely. The call to `get_node_path()` should only happen only if SSR mode is set to true.
  
  This is because this call breaks the application from launching if `get_node_path()` fails. The `get_node_path()` call fails due to failing to launch a subprocess (calling `which` to check the path of `node`) because it is not allowed. Note that SSR mode is set to false and is not required. This is a very niche use-case but this can happen, for instance, if the app is running inside a trusted platform module where forking new processes will fail.
  
  I suggest a change along the following lines. I can submit a pull request if this is okay.
  
  ```
  self.node_path = os.environ.get(
              "GRADIO_NODE_PATH", "" if wasm_utils.IS_WASM else get_node_path()
          )
  ```
  be moved to within the following if block `if self.ssr_mode:`.
  
  
  ### Have you searched existing issues?  🔎
  
  - [x] I have searched and found no existing issues
  
  ### Reproduction
  
  It is less to do with the code that launches Gradio and more to do with the environment where it is launched.
  
  
  ### Screenshot
  
  _No response_
  
  ### Logs
  
  ```shell
  
  ```
  
  ### System Info
  
  ```shell
  Gradio Environment Information:
  ------------------------------
  Operating System: Linux
  gradio version: 5.20.0
  gradio_client version: 1.7.2
  
  ------------------------------------------------
  gradio dependencies in your environment:
  
  aiofiles: 23.2.1
  anyio: 4.8.0
  audioop-lts is not installed.
  fastapi: 0.115.11
  ffmpy: 0.5.0
  gradio-client==1.7.2 is not installed.
  groovy: 0.1.2
  httpx: 0.28.1
  huggingface-hub: 0.29.1
  jinja2: 3.1.5
  markupsafe: 2.1.5
  numpy: 2.0.2
  orjson: 3.10.15
  packaging: 24.2
  pandas: 2.2.2
  pillow: 11.1.0
  pydantic: 2.10.6
  pydub: 0.25.1
  python-multipart: 0.0.20
  pyyaml: 6.0.2
  ruff: 0.9.9
  safehttpx: 0.1.6
  semantic-version: 2.10.0
  starlette: 0.46.0
  tomlkit: 0.13.2
  typer: 0.15.1
  typing-extensions: 4.12.2
  urllib3: 2.3.0
  uvicorn: 0.34.0
  authlib; extra == 'oauth' is not installed.
  itsdangerous; extra == 'oauth' is not installed.
  
  
  gradio_client dependencies in your environment:
  
  fsspec: 2025.2.0
  httpx: 0.28.1
  huggingface-hub: 0.29.1
  packaging: 24.2
  typing-extensions: 4.12.2
  websockets: 15.0
  ```
  
  ### Severity
  
  Blocking usage of gradio