polygonplanet / sublime-text-eslint

ESLint any JavaScript file in Sublime Text
24 stars 7 forks source link

Error on save #10

Closed maikelmclauflin closed 7 years ago

maikelmclauflin commented 7 years ago

I am consistantly getting an error pop up in my console

[Errno 20] Not a directory
[cmd: ['node', '/Users/username/Library/Application Support/Sublime Text 3/Packages/ESLint/linter.js', '/Users/username/Sites/specless/gcloud/sp_tag_scripts/development/csf/6-2-4/src/lib/Panel.js', '/usr/local/lib/node_modules', '/Users/username/.eslintrc.js']]
[dir: /Users/username/Sites/specless/gcloud/sp_tag_scripts/development/csf/6-2-4/src/lib]
[path: /usr/local/bin/node]
[Finished]

my user config in the sublime settings is as follows

{
  "node_path": "/usr/local/bin/node",
  "node_modules_path": "/usr/local/lib/node_modules",
  "config_file": "/Users/username/.eslintrc.js"
}

and my .eslintrc.js is as follows

{
    parserOptions: {
        ecmaVersion: 5,
        ecmaFeatures: {
            impliedStrict: true
        }
    }
}

however, the error was happening before i added the .eslintrc.js file and even before i added in my paths.

ryanhugh commented 7 years ago

Try changing

"node_path": "/usr/local/bin/node",

to this

"node_path": "/usr/local/bin",

In your .sublime-settings file.

I think node_path is supposed to be a folder that contains the file node. :)

If that dosen't work, can you post the output of which node from the command line?

polygonplanet commented 7 years ago

@ryanhugh Thanks for hint! @mmclau14 Did you solve it?

tsuriga commented 7 years ago

I'd close this, that's exactly the error you get for including "node" in the node_path and ryanhugh's tip fixes it.