Skip to content

Cannot launch dev server from WSL #629

@stephenlf

Description

@stephenlf

Summary

Cannot launch sf lightning dev component from WSL.

Steps To Reproduce:

  1. Open an SFDX project in WSL.
  2. Run sf lightning dev component
  3. Select a component

Expected Result

The browser opens and navigates to the preview screen.

Actual Result

The CLI process hangs indefinitely, without logs. To throw salt in the wound, it also ignores any SIGINT signals (ctrl + C). It seems to be trying to launch the default browser, which fails in a headless WSL environment.

Additional Information

Launching a dev server should NOT be tightly coupled to launching a browser. Just start the server and print the URL to navigate to.

System Information

SF CLI:

{
  "architecture": "wsl-x64",
  "cliVersion": "@salesforce/cli/2.122.6",
  "nodeVersion": "node-v22.22.0",
  "osVersion": "Linux 6.6.87.2-microsoft-standard-WSL2",
  "rootPath": "/home/sfunk/.local/share/sf/client/2.122.6-e047207",
  "shell": "fish",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.40 (core)",
    "@oclif/plugin-commands 4.1.40 (core)",
    "@oclif/plugin-help 6.2.37 (core)",
    "@oclif/plugin-not-found 3.2.74 (core)",
    "@oclif/plugin-plugins 5.4.55 (core)",
    "@oclif/plugin-search 1.2.37 (core)",
    "@oclif/plugin-update 4.7.18 (core)",
    "@oclif/plugin-version 2.2.36 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.55 (core)",
    "@oclif/plugin-which 3.2.43 (core)",
    "@salesforce/cli 2.122.6 (core)",
    "@salesforce/lwc-dev-server 2.11.0 (user) published 1626 days ago (Tue Sep 07 2021)",
    "agent 1.27.3 (core)",
    "apex 3.9.5 (core)",
    "api 1.3.8 (core)",
    "auth 4.1.4 (core)",
    "code-analyzer 5.9.0 (user) published 23 days ago (Wed Jan 28 2026)",
    "data 4.0.67 (core)",
    "deploy-retrieve 3.24.7 (core)",
    "dev 2.5.1 (user) published 458 days ago (Tue Nov 19 2024)",
    "devops-center 1.2.27 (user) published 425 days ago (Sat Dec 21 2024)",
    "info 3.4.100 (core)",
    "lightning-dev 4.5.3 (user) published 73 days ago (Mon Dec 08 2025)",
    "limits 3.3.74 (core)",
    "marketplace 1.3.8 (core)",
    "org 5.9.64 (core)",
    "packaging 2.24.11 (core)",
    "schema 3.3.90 (core)",
    "settings 2.4.54 (core)",
    "sobject 1.4.82 (core)",
    "telemetry 3.6.71 (core)",
    "templates 56.4.7 (core)",
    "trust 3.7.113 (core)",
    "user 3.6.48 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.2.1 (user) published 503 days ago (Fri Oct 04 2024)",
    "@salesforce/sfdx-scanner 4.12.0 (user) published 296 days ago (Tue Apr 29 2025)"
  ]
}
  • Shell: fish
  • OS: Ubuntu 24.04.3 LTS via WSL (Windows 11)
  • Default Web Browser (WSL): google-chrome-stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions