polygonplanet/sublime-text-eslint

Error on save

Closed this issue · 3 comments

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.

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?

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

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