Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the "Error: spawn ...Microsoft VS Code\Code.exe ENOENT" error message to provide more information #1629

Open
DanKaplanSES opened this issue Apr 7, 2023 · 1 comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@DanKaplanSES
Copy link

DanKaplanSES commented Apr 7, 2023

I think I'm having this issue: #1225 I'm not certain because the error message only says this:

Uncaught exception received.
Error: spawn C:\Program Files\Microsoft VS Code\Code.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Regardless, I think it could help if this error message provided more information so it's easier to troubleshoot for all parties. Unfortunately, I made major changes before I noticed this output (the plug-in was working correctly on this project a few days ago):

  1. I upgraded to the latest VS Code.
  2. I installed the latest Windows version of node.js
  3. I globally installed the latest typescript and ts-node (it wasn't globally installed before that)
  4. In this project, I upgraded all package.json dependencies to the latest major version
  5. I created my first WSL project and "reinstalled" all the extensions for it (I'm not really sure what that was about)
  6. The project that's reporting this error is non-WSL. I don't have a WSL project that uses this extension.

I see this message every time I open a file that wasn't already in the tab group. It doesn't occur if I visit to tabs I've already browsed once.


Update: it's worth noting that I fixed my issue but I'd still like to request this change.

I resolved this by changing my user settings to add "eslint.runtime": "node", and removed the "eslint.nodePath" line. The former made the plugin use the latest version of node on my system (I'm not sure where it was getting the version it was using). I'm not sure why it was important for me to remove the second line, but the error message changed to something like Error: spawn ...Node.exe ENOENT once I added the first line. Restarting the app was required.

@dbaeumer dbaeumer added this to the Backlog milestone Apr 11, 2023
@dbaeumer dbaeumer added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Apr 11, 2023
@FDiskas
Copy link

FDiskas commented Nov 8, 2023

Thank you for providing a solution - same issue landed on my side also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

3 participants