Skip to content

ESLint client: couldn't create connection to server. #1754

@chrispalmo

Description

@chrispalmo

Issue Summary for vscode-eslint

Error Description

While using the ESLint extension in VSCode, the following errors are encountered:

  • ESLint server starts and stops immediately.
  • Error message: "couldn't create connection to server."
  • Issue with launching server using runtime node: "Error: spawn node ENOENT."
[Info  - 12:28:41] ESLint server is starting.
[Info  - 12:28:41] ESLint server stopped.
[Error - 12:28:41] ESLint client: couldn't create connection to server.
Launching server using runtime node failed. Error: spawn node ENOENT
[Error - 12:28:41] Starting the server failed.
Launching server using runtime node failed. Error: spawn node ENOENT
[Info  - 12:28:41] PATH environment variable is: /usr/bin:/bin:/usr/sbin:/sbin

Diagnostic Information

  • MacOS Sonoma 14.2 (23C64), Apple M1 Max
  • Node.js version: v18.18.2
  • Location of Node.js: /Users/cp/.npm/bin/node

Steps Taken to Resolve

  1. Node.js Installation Verification: Confirmed Node.js is installed and accessible via PATH.
  2. Updated PATH Variable: Verified Node.js path is included in the system's PATH.
  3. VSCode Settings for ESLint:
    • Tried various configurations for eslint.nodePath including empty, specific path and null.
  4. Reinstall ESLint Extension: Uninstalled and reinstalled the ESLint extension without resolution.
  5. Check and Update Node Version: Using n, updated and verified the Node version.
  6. ESLint Runtime Path Setting: Attempted setting eslint.runtime to the path of the Node executable.
  7. User Settings Configuration: Tested with different configurations in VSCode user settings.
  8. Permissions Check: Verified permissions for Node binary and relevant directories.
  9. Direct Execution in VSCode Terminal: Confirmed ability to run Node via VSCode terminal.
  10. Setting eslint.runtime to Null: Tried explicitly setting eslint.runtime to null.
  11. Permissions and Configuration:
  • Explored the possibility of permission issues with the Node binary and relevant directories.
  • Checked and confirmed proper read/write/execute permissions.
  • VSCode user configuration was modified and tested in various states, including removing all properties, without resolving the issue.

Additional Context

  • The Node.js installation was managed using n (version 8.2.0).
  • Fresh installation of VSCode
  • Potential issues with permission settings or VSCode user configuration were discussed but remain unresolved.

Conclusion

The issue seems to be a complex interaction between the VSCode ESLint extension, Node.js installation, and possibly VSCode's access to system variables or user settings. Despite multiple troubleshooting steps, the problem persists, indicating a need for direct intervention or guidance from the VSCode or vscode-eslint development team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    info-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions