-
Notifications
You must be signed in to change notification settings - Fork 324
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
Server process exited with code 0 #1796
Comments
Very hard to say without reproducible steps. Can you please provide me with a GitHub repository I can clone with a minimal repro case. |
A GitHub repository with a minimal setup I could clone would be helpful. |
Using vscode-eslint 2.4.4 it happens for me in this repo aswell, you might have to reload eslint for it to occur. The repo is straight copy of the original repo except I've removed all closed source code. https://github.com/ljukas/vscode-eslint-repro Thanks for looking into this |
Can you please also provide steps to reproduce |
Enter any .tsx file, open eslint output. You might need to reload the eslint server for it to exit out like above |
can you run eslint from the cli and check if it actually matches any files? it looks like vscode-eslint crashes if it cannot find any files.
vscode-eslint might also just crash because of it. |
Just want to chime in that I have the exact same error. eslint output yields:
I don't have any repos I could share to reproduce. But please let me know what I can do to help debug this. |
For me I could only get this error when I run the restart eslint server command. So, here is how I reproduce the error with the repo that was provided:
|
@birgersp your example is actually fine. The exit code 0 comes from the server that is restarted. For some reason it is printed into the new log. I will make this a info and ensure that it shows up in the correct log. |
Hello, I don't know if I should open a new thread for this, but I believe it is relevant. Problem: Only way for me to view current problem (errors and warnings) on "Problems" tab is to when I do this, current problems show up on problems bar. But after that if I open a file with problems and close it without fixing the problems, the related errors will disappear from the problems tab. I checked out the output log of ESLint right after restarting it, it says: [Info - 5:25:47 PM] ESLint server is starting. When I read it, I see that first it starts, then runs, and then exists with code 0 immediately. I except it to run continuously, so that I can view current problems as I write my code. Any help is appreciated, |
@cihanselcuk actually the message From what you describe it is a setup problem with ESLint itself. Can you validate files successfully in the terminal using eslint from the ./node_modules/.bin` folder? If yes, please provide me with a GitHub repository a I can clone having a minimal repro case that demos what you are seeing |
I had the exact same problem. I switched to "Pre-release version" of Click cog next to eslint extension -> Switch to Pre-release version. |
I also got this error in one project, running another project (internal so can't share the source) on the same machine with almost the same dependencies. Are there any log files etc where one can see why we get the |
@enkelmedia have you seen this comment: #1796 (comment) It might be a false positive :-) |
@dbaeumer Nope, I get the error when it's startup just after loading the project/workspace. Are there any detailed logs to find out more about why this is happening? |
Only the ESLint output channel. Can you provide me with a GitHub repository with a minimal setup I can clone that demos this. Then I can have a look. |
The same thing happened here and I managed to fix it. My scenario was a monorepo and i was using a |
This is what I had to do for the extension to work correctly. Cheers. |
Instead of using the pre release (which worked for me), you can also use the setting |
switch to pre-release version, then > restart eslint server change output from:
to
|
I think I'm facing the same issue: ESLint works fine when started the first time (when opening VSCode or closing and reopening the project), but it stops working after a manual restart using 'ESLint: Restart ESLint server'. Project details:
Steps to reproduce the problem (tried in a handful of projects):
I have enabled
|
@ewildee do you have a Github repository I can clone that demos this. It ensure that we use the same setup. |
@dbaeumer Thanks for having a look. I've created a simple monorepo setup with a readme describing the steps to reproduce the problem: https://github.com/ewildee/test-20240529-vscode-eslint-minimal-monorepo |
@ewildee I was not able to reproduce this. Here is what I did cast.mp4Is there anything special in the ESLint Output channel. Could you enable tracing using |
@dbaeumer It turns out my steps weren't 100% correct: Linting only doesn't work for files that haven't been opened before (and for new files), and only the first time they're opened. I've tested it on two different macOS systems. Screen.Recording.2024-05-30.at.11.55.21.movThe screen recording is from a MacBook running node v20 (instead of v22) without any custom ESLint settings (besides the ones in |
The ESLint Clearly there is an issue within the PNP infra that causes the ESLint flat config not to work as expected. |
I'm experiencing the same issue that ESLint stops working randomly after some time. Restarting the ESLint server does not help and yields the results as written in the issue description. Restarting the extension host or VS Code completely fixes the issue. I'll enable tracing as suggested and report back. ESLint 8.x, not using the new flat config. |
When running Eslint in vscode using flat config I get the following output:
The eslint server keeps exiting without saying why.
This is my
eslint.config.mjs
Here are some of my releveant vscode settings:
Eslint works in the terminal and it works for a second or two in vscode after restart of the eslint server.
I have a monorepo project with only one eslint.config.mjs in the root that handles the entire project, no seperate .eslintrc or anything
The text was updated successfully, but these errors were encountered: