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

eslint_d could not connect #61

Closed
flashios09 opened this issue Feb 3, 2017 · 7 comments
Closed

eslint_d could not connect #61

flashios09 opened this issue Feb 3, 2017 · 7 comments

Comments

@flashios09
Copy link

flashios09 commented Feb 3, 2017

Hi,
I installed eslint_d globally npm i eslint_d -g and tried to lint a file but when i run eslint_d app.js nothing happens(more than 2min without anything) while the eslint app.js cmd display the lint errors.
I tried eslint_d status and i have this message could not connect.
image

I checked the ~/.eslint_d and the file has one line 53288 59a364a04c2ec7b5.

The eslint_d --version give me this v3.14.1 (eslint_d v4.2.1), the help cmd for eslint_d works also(the same output of eslint --help).

Is there a log file that i can take a look to understand why eslint_d could not connect ?
Thanks

@mantoni
Copy link
Owner

mantoni commented Feb 3, 2017

That is odd. I guess the error occurs here: https://github.com/mantoni/eslint_d.js/blob/master/lib/client.js#L13

Maybe you can add an err parameter and add it to the output? That should give us some more information.

@flashios09
Copy link
Author

flashios09 commented Feb 4, 2017

@mantoni i created a new file to test net.connect

    var net = require('net');
    var socket = net.connect(3000, function () {
      console.log('connected');
    });
    socket.on('error', function () {
      console.log('Could not connect');
    });

then node test.js and it give me Could not connect, i uninstalled nodejs(version 6.x) and reinstall it(version 7.x) via brew, today i will re-test it

Thanks

@flashios09
Copy link
Author

flashios09 commented Feb 4, 2017

i uninstalled nodejs(version 6.x) and reinstall it(version 7.x)

This solved the problem and now when i do eslint_d status i have running

Thanks

@AlexKvazos
Copy link

I had this issue, the fix is to remove ~/.eslint_d.

I think we need to handle the error that if it fails to connect to the server (because it got killed somehow) it should delete the reference to its port so a new one can start.

@mantoni
Copy link
Owner

mantoni commented Sep 14, 2018

@AlexKvazos Sounds like a good idea. Would you care to contribute a pull request with your suggested solution?

@AlexKvazos
Copy link

PR #95 Sent 👍

@mantoni
Copy link
Owner

mantoni commented Sep 18, 2018

A solution is now available in v7.1.1 (see release notes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants