SublimeLinter: SublimeLinter: ERROR: env: node: No such file or directory

Sublime linter cannot find the lints I have installed. I have set the env links properly, but it just does not work.

startup, version: 3114 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/asaadmahmood/Library/Application Support/Sublime Text 3/Packages
state path: /Users/asaadmahmood/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/asaadmahmood/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.32939
startup time: 0.381895
first paint time: 0.417413
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin 0_package_control_loader.00-package_control
reloading plugin 0_package_control_loader.55-jsonschema
reloading plugin AutoFileName.autofilename
reloading plugin AutoFileName.getimageinfo
reloading plugin Emmet.emmet-plugin
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarAPI
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin SublimeLinter-contrib-sass-lint.linter
reloading plugin SublimeLinter-eslint.linter
reloading plugin SublimeLinter.__init__
reloading plugin SublimeLinter.busy_indicator_view
reloading plugin SublimeLinter.goto_commands
reloading plugin SublimeLinter.highlight_view
reloading plugin SublimeLinter.log_handler
reloading plugin SublimeLinter.message_view
reloading plugin SublimeLinter.panel_view
reloading plugin SublimeLinter.status_bar_view
reloading plugin SublimeLinter.sublime_linter
reloading plugin Trimmer.Trimmer
reloading plugin CSScomb.CSScomb
plugins loaded
Emmet: No need to update PyV8
SublimeLinter: ERROR: env: node: No such file or directory

Package Control: Skipping automatic upgrade, last run at 2018-04-13 13:18:14, next run at 2018-04-13 14:18:14 or after
SublimeLinter: WARNING: WARNING: sass cannot locate 'sass-lint'
SublimeLinter: ERROR: env: node: No such file or directory

SublimeLinter: ERROR: env: node: No such file or directory

SublimeLinter: ERROR: env: node: No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 18 (4 by maintainers)

Most upvoted comments

For me I have ESLint and SassLint installed.

My various dependencies were installed via homebrew but you can find where your dependencies may be installed by using the which command. E.g. which node -> /usr/local/bin/node.

I got ESLint set up a while back but was trying to get sass-lint working and was seeing the following error:

SublimeLinter: WARNING: sass output:
env: node: No such file or directory

For my setup adding "sass": { "env": {"PATH":"/usr/local/bin/"} } to Sublime test > Preference > Package Settings > SublimeLinter > Settings solved the issue.

Full config for context:

// SublimeLinter Settings - User
{
    "linters": {
        "eslint": {
            "env": {"PATH":"/usr/local/bin/"}
        },
        "sass": {
            "env": {"PATH":"/usr/local/bin/"}
        }
    },
    "paths": {
        "linux": [],
        "osx": [
            "/usr/local/bin/",
        ],
        "windows": []
    }
}

Since you’re trying to get 'sass-lint' to run, you may need to name your property "sass-lint": { "env": {"PATH":"/usr/local/bin/"} }. Good luck!

Seeing this now too - not sure what’s going on, I’m only seeing the following:

SublimeLinter: #61 eslint labs-site-header.js ERROR:
====================================================

env: node: No such file or directory

What file is missing?

Apparently the correct syntax for sass-lint in SublimeLinter v4.10.0 is “sass”.

I’ve just had the same problem.

On the initial install of SublimeLinter and specific linters, they all worked fine. Once I shut down and restarted they stopped working. After reading Robpayot comment, I changed sass-lint to sass and this fixed my issue.

For me I had to add the following to the SublimeLinter settings.

"linters": {
   "sass": {
      "env": {"PATH":"/usr/local/bin/"}
    },
    "tidy": {
       "env": {"PATH":"/usr/local/bin/"}
    },
     "jshint": {
       "env": {"PATH":"/usr/local/bin/"}
    },
},

"paths": {
   "linux": [],
     "osx": [
        "/usr/local/bin/"
      ],
     "windows": [
}

Issues like this make Sublime Text and SublimeLinter not really worth the effort; best to use VSCode! Not sure why this was closed.

I’m still experiencing this. How long before a fix?

Since you’re trying to get 'sass-lint' to run, you may need to name your property "sass-lint": { "env": {"PATH":"/usr/local/bin/"} }. Good luck!

Apparently the correct syntax for sass-lint in SublimeLinter v4.10.0 is "sass".

"linters": {
    "sass": {
        "env": {"PATH":"/usr/local/bin/"}
    }
}

Adding that code to my SublimeLinter settings fixed my error.

My SublimeLinter recently broke due to brew deciding, by itself, that it was time to update my Node version when I did a brew install somepackage.

To fix it, run which node in any terminal. I got this path:

/usr/local/opt/node@16/bin/node

So, in Sublime, issue a CMD SHIFT P and select SublimeLinter Settings. It will open a JSON file. Mine was like this:

// SublimeLinter Settings - User
{
  "debug": true,
  "linters": {
    "eslint": {
      "selector": "text.html.vue, source.js - meta.attribute-with-value", 
    }
  }
}

Then you just add a ENV key, taking care to point to the node FOLDER, not the node binary itself, so the end file was like this:

// SublimeLinter Settings - User
{
  "debug": true,
  "linters": {
    "eslint": {
      "selector": "text.html.vue, source.js - meta.attribute-with-value",
      "env": {
        "PATH": "/usr/local/opt/node@16/bin" // my path to node's binary
      }
    }
  }
}

Save the file and issue a CMD SHIFT P and “Reload sublimelinter and its plugins”. Voilá!