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

SublimeLinter doesn't recognize linters installed with NVM #128

Closed
wldcordeiro opened this Issue Aug 8, 2014 · 41 comments

Comments

@wldcordeiro

I have a few linters installed with NVM (jshint, csslint) and Sublime Linter won't recognize them. I've added the path to my settings but according to my console SublimeLinter is still looking in the wrong place.

Here's my SublimeLinter settings.
https://gist.github.com/ec03df57e48eac45263b

@wldcordeiro wldcordeiro closed this Aug 8, 2014

@wldcordeiro wldcordeiro reopened this Aug 8, 2014

@aparajita

This comment has been minimized.

Show comment
Hide comment
@aparajita

aparajita Aug 10, 2014

Contributor

NVM isn't supported.

Contributor

aparajita commented Aug 10, 2014

NVM isn't supported.

@wldcordeiro

This comment has been minimized.

Show comment
Hide comment
@wldcordeiro

wldcordeiro Aug 11, 2014

@aparajita That doesn't make much sense, if there's a setting for the path that should make it work. Why does the plugin keep looking in /usr/bin/env

@aparajita That doesn't make much sense, if there's a setting for the path that should make it work. Why does the plugin keep looking in /usr/bin/env

@aparajita

This comment has been minimized.

Show comment
Hide comment
@aparajita

aparajita Aug 11, 2014

Contributor

That question can't be answered without seeing the complete debug output from the console.

Contributor

aparajita commented Aug 11, 2014

That question can't be answered without seeing the complete debug output from the console.

@wldcordeiro

This comment has been minimized.

Show comment
Hide comment
@wldcordeiro

wldcordeiro Aug 11, 2014

SublimeLinter: flake8 imported <module 'flake8.engine' from '/usr/local/lib/python3.4/dist-packages/flake8/engine.py'> 
SublimeLinter: pyyaml imported <module 'yaml' from '/usr/local/lib/python3.4/dist-packages/yaml/__init__.py'> 
SublimeLinter: ENV['GEM_HOME'] = 'None' 
SublimeLinter: jshint version query: /home/wldcordeiro/npm/bin/jshint --version 
SublimeLinter: WARNING: no jshint version could be extracted from:
/usr/bin/env: node: No such file or directory
SublimeLinter: flake8 imported <module 'flake8.engine' from '/usr/local/lib/python3.4/dist-packages/flake8/engine.py'> 
SublimeLinter: pyyaml imported <module 'yaml' from '/usr/local/lib/python3.4/dist-packages/yaml/__init__.py'> 
SublimeLinter: ENV['GEM_HOME'] = 'None' 
SublimeLinter: jshint version query: /home/wldcordeiro/npm/bin/jshint --version 
SublimeLinter: WARNING: no jshint version could be extracted from:
/usr/bin/env: node: No such file or directory
@aparajita

This comment has been minimized.

Show comment
Hide comment
@aparajita

aparajita Aug 11, 2014

Contributor

That isn't the complete output. I need to see everything from startup.

Contributor

aparajita commented Aug 11, 2014

That isn't the complete output. I need to see everything from startup.

@wldcordeiro

This comment has been minimized.

Show comment
Hide comment
@wldcordeiro

wldcordeiro Aug 11, 2014

DPI scale: 1
startup, version: 3062 linux x64 channel: dev
executable: /opt/sublime_text/sublime_text
working dir: /
packages path: /home/wldcordeiro/.config/sublime-text-3/Packages
state path: /home/wldcordeiro/.config/sublime-text-3/Local
hardware concurrency: 8
zip path: /opt/sublime_text/Packages
zip path: /home/wldcordeiro/.config/sublime-text-3/Installed Packages
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
found 57 files for base name Main.sublime-menu
loading pointer bindings
found 1 files for base name predawn.sublime-theme
loading bindings
theme loaded
app ready
wrote startup cache, added files: 10 orphaned files: 0 total files: 418 cache hits: 408
pre session restore time: 0.142069
using gamma: 1 (err: 0)
startup time: 0.262957
first paint time: 0.273019
launching: /opt/sublime_text/plugin_host
reloading plugin Default.block
reloading plugin Default.comment
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_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.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_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 Better CoffeeScript.CoffeeScript
reloading plugin BracketHighlighter.bh_core
reloading plugin BracketHighlighter.bh_logging
reloading plugin BracketHighlighter.bh_plugin
reloading plugin BracketHighlighter.bh_regions
reloading plugin BracketHighlighter.bh_remove
reloading plugin BracketHighlighter.bh_rules
reloading plugin BracketHighlighter.bh_search
reloading plugin BracketHighlighter.bh_swapping
reloading plugin BracketHighlighter.bh_wrapping
reloading plugin BracketHighlighter.ure
reloading plugin CTags.ctags
reloading plugin CTags.ctagsplugin
reloading plugin CTags.test_ctags
reloading plugin CTags.test_ctagsplugin
reloading plugin ChangeQuotes.change_quotes
reloading plugin ColorPicker.sublimecp
reloading plugin Colorsublime.colorsublime-plugin
loaded 1290 snippets
reloading plugin Emmet.emmet-plugin
reloading plugin FindKeyConflicts.find_key_conflicts
reloading plugin Gist.gist
reloading plugin Gist.helpers
reloading plugin Gist.request
reloading plugin Gist.settings
reloading plugin Git.add
reloading plugin Git.annotate
reloading plugin Git.commit
reloading plugin Git.diff
reloading plugin Git.flow
reloading plugin Git.git
reloading plugin Git.history
reloading plugin Git.repo
reloading plugin Git.stash
reloading plugin Git.status
reloading plugin Git.statusbar
reloading plugin GitGutter.git_gutter
reloading plugin GitGutter.git_gutter_change
reloading plugin GitGutter.git_gutter_compare
reloading plugin GitGutter.git_gutter_events
reloading plugin GitGutter.git_gutter_handler
reloading plugin GitGutter.git_helper
reloading plugin GitGutter.view_collection
reloading plugin Markdown Preview.MarkdownPreview
reloading plugin Markdown Preview.helper
reloading plugin Markdown Preview.markdown_wrapper
reloading plugin Markdown Preview.settings
reloading plugin Package Control.Package Control
reloading plugin Restructured Text (RST) Snippets.footnotes
reloading plugin Restructured Text (RST) Snippets.headers
reloading plugin Restructured Text (RST) Snippets.helpers
reloading plugin Restructured Text (RST) Snippets.indent_list_item
reloading plugin Restructured Text (RST) Snippets.lists
reloading plugin Restructured Text (RST) Snippets.render
reloading plugin Restructured Text (RST) Snippets.simpleformat
reloading plugin Restructured Text (RST) Snippets.tables
reloading plugin SCSS.scss_completions
reloading plugin Schemr.schemr
reloading plugin SideBarEnhancements.Edit
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin SideBarEnhancements.StatusBarFileSize
reloading plugin SideBarEnhancements.StatusBarModifiedTime
reloading plugin SublimeLinter-contrib-scss-lint.linter
SublimeLinter: scss linter loaded 
reloading plugin SublimeLinter-csslint.linter
SublimeLinter: csslint linter loaded 
reloading plugin SublimeLinter-flake8.linter
SublimeLinter: flake8 linter loaded 
reloading plugin SublimeLinter-jshint.linter
SublimeLinter: jshint linter loaded 
reloading plugin SublimeLinter-pyyaml.linter
SublimeLinter: pyyaml linter loaded 
reloading plugin SublimeLinter-ruby.linter
SublimeLinter: ruby linter loaded 
reloading plugin Sublimerge Pro.Sublimerge
reloading plugin Themr.themr
reloading plugin Vintageous.__init__
reloading plugin Vintageous.builder
reloading plugin Vintageous.dev_cmds
reloading plugin Vintageous.ex_commands
reloading plugin Vintageous.ex_main
reloading plugin Vintageous.ex_motions
reloading plugin Vintageous.jump_list_cmds
reloading plugin Vintageous.modelines
reloading plugin Vintageous.state
reloading plugin Vintageous.test_runner
reloading plugin Vintageous.toplist
reloading plugin Vintageous.xactions
reloading plugin Vintageous.xmotions
reloading plugin Vintageous.xsupport
reloading plugin Vintageous.xsupport_mouse
reloading plugin WordCount.WordCount
reloading plugin Anaconda.anaconda
reloading plugin Emmet Style Reflector.emmet_style_reflector
reloading plugin HTML-CSS-JS Prettify.HTMLPrettify
reloading plugin PlainTasks.PlainTasks
reloading plugin SublimeLinter.commands
reloading plugin SublimeLinter.sublimelinter
reloading plugin SublimeREPL.__init__
reloading plugin SublimeREPL.completions
reloading plugin SublimeREPL.lang_integration
reloading plugin SublimeREPL.run_existing_command
reloading plugin SublimeREPL.sublimerepl
reloading plugin SublimeREPL.sublimerepl_build_system_hack
reloading plugin SublimeREPL.text_transfer
plugins loaded
schemr ready
themr ready
SublimeLinter: debug mode: on 
SublimeLinter: temp directory: /tmp/SublimeLinter3 
SublimeLinter: find_python(version='3', script=None, module=None) 
SublimeLinter: find_python: requested version = {'minor': None, 'major': 3} 
SublimeLinter: user shell: /bin/bash 
SublimeLinter: computed PATH using /bin/bash:
~/npm/bin/
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games

SublimeLinter: find_posix_python: python3 => /usr/bin/python3 
SublimeLinter: find_python: system python = /usr/bin/python3 
SublimeLinter: find_python: available version = {'minor': 4, 'major': 3} 
SublimeLinter: find_python: <= ('/usr/bin/python3', None, 3, 4) 
SublimeLinter: sys.path for /usr/bin/python3:
/usr/lib/python3.4
/usr/lib/python3.4/plat-x86_64-linux-gnu
/usr/lib/python3.4/lib-dynload
/usr/local/lib/python3.4/dist-packages
/usr/lib/python3/dist-packages

SublimeLinter: flake8 imported <module 'flake8.engine' from '/usr/local/lib/python3.4/dist-packages/flake8/engine.py'> 
SublimeLinter: pyyaml imported <module 'yaml' from '/usr/local/lib/python3.4/dist-packages/yaml/__init__.py'> 
SublimeLinter: ENV['GEM_HOME'] = 'None' 
Emmet: No need to update PyV8
SublimeLinter: found existing Rails syntax, version 1 
found 57 files for base name Main.sublime-menu
SublimeLinter: found existing HTML syntax, version 3 
['git', 'push']
Package Control: Installing 1 upgrades
ignored packages updated to: [Markdown, Vintage, Sublimerge Pro]
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
unloading plugin Sublimerge Pro.Sublimerge
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
generating syntax summary
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
found 56 files for base name Main.sublime-menu
found 1 files for base name predawn.sublime-theme
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
generating syntax summary
found 26 files for base name Default.sublime-keymap
found 3 files for base name Default.sublime-mousemap
loading pointer bindings
theme loaded
loading pointer bindings
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name predawn.sublime-theme
theme loaded
Package Control: Upgraded Sublimerge Pro to v2.8.9
ignored packages updated to: [Markdown, Vintage]
found 1 files for base name predawn.sublime-theme
reloading Packages/User/Package Control.sublime-settings
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
reloading plugin Sublimerge Pro.Sublimerge
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
generating syntax summary
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
found 57 files for base name Main.sublime-menu
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
theme loaded
loading pointer bindings
reloading Packages/User/Preferences.sublime-settings
loading pointer bindings
found 1 files for base name predawn.sublime-theme
theme loaded
DPI scale: 1
startup, version: 3062 linux x64 channel: dev
executable: /opt/sublime_text/sublime_text
working dir: /
packages path: /home/wldcordeiro/.config/sublime-text-3/Packages
state path: /home/wldcordeiro/.config/sublime-text-3/Local
hardware concurrency: 8
zip path: /opt/sublime_text/Packages
zip path: /home/wldcordeiro/.config/sublime-text-3/Installed Packages
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
found 57 files for base name Main.sublime-menu
loading pointer bindings
found 1 files for base name predawn.sublime-theme
loading bindings
theme loaded
app ready
wrote startup cache, added files: 10 orphaned files: 0 total files: 418 cache hits: 408
pre session restore time: 0.142069
using gamma: 1 (err: 0)
startup time: 0.262957
first paint time: 0.273019
launching: /opt/sublime_text/plugin_host
reloading plugin Default.block
reloading plugin Default.comment
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_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.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_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 Better CoffeeScript.CoffeeScript
reloading plugin BracketHighlighter.bh_core
reloading plugin BracketHighlighter.bh_logging
reloading plugin BracketHighlighter.bh_plugin
reloading plugin BracketHighlighter.bh_regions
reloading plugin BracketHighlighter.bh_remove
reloading plugin BracketHighlighter.bh_rules
reloading plugin BracketHighlighter.bh_search
reloading plugin BracketHighlighter.bh_swapping
reloading plugin BracketHighlighter.bh_wrapping
reloading plugin BracketHighlighter.ure
reloading plugin CTags.ctags
reloading plugin CTags.ctagsplugin
reloading plugin CTags.test_ctags
reloading plugin CTags.test_ctagsplugin
reloading plugin ChangeQuotes.change_quotes
reloading plugin ColorPicker.sublimecp
reloading plugin Colorsublime.colorsublime-plugin
loaded 1290 snippets
reloading plugin Emmet.emmet-plugin
reloading plugin FindKeyConflicts.find_key_conflicts
reloading plugin Gist.gist
reloading plugin Gist.helpers
reloading plugin Gist.request
reloading plugin Gist.settings
reloading plugin Git.add
reloading plugin Git.annotate
reloading plugin Git.commit
reloading plugin Git.diff
reloading plugin Git.flow
reloading plugin Git.git
reloading plugin Git.history
reloading plugin Git.repo
reloading plugin Git.stash
reloading plugin Git.status
reloading plugin Git.statusbar
reloading plugin GitGutter.git_gutter
reloading plugin GitGutter.git_gutter_change
reloading plugin GitGutter.git_gutter_compare
reloading plugin GitGutter.git_gutter_events
reloading plugin GitGutter.git_gutter_handler
reloading plugin GitGutter.git_helper
reloading plugin GitGutter.view_collection
reloading plugin Markdown Preview.MarkdownPreview
reloading plugin Markdown Preview.helper
reloading plugin Markdown Preview.markdown_wrapper
reloading plugin Markdown Preview.settings
reloading plugin Package Control.Package Control
reloading plugin Restructured Text (RST) Snippets.footnotes
reloading plugin Restructured Text (RST) Snippets.headers
reloading plugin Restructured Text (RST) Snippets.helpers
reloading plugin Restructured Text (RST) Snippets.indent_list_item
reloading plugin Restructured Text (RST) Snippets.lists
reloading plugin Restructured Text (RST) Snippets.render
reloading plugin Restructured Text (RST) Snippets.simpleformat
reloading plugin Restructured Text (RST) Snippets.tables
reloading plugin SCSS.scss_completions
reloading plugin Schemr.schemr
reloading plugin SideBarEnhancements.Edit
reloading plugin SideBarEnhancements.SideBar
reloading plugin SideBarEnhancements.SideBarDefaultDisable
reloading plugin SideBarEnhancements.StatusBarFileSize
reloading plugin SideBarEnhancements.StatusBarModifiedTime
reloading plugin SublimeLinter-contrib-scss-lint.linter
SublimeLinter: scss linter loaded 
reloading plugin SublimeLinter-csslint.linter
SublimeLinter: csslint linter loaded 
reloading plugin SublimeLinter-flake8.linter
SublimeLinter: flake8 linter loaded 
reloading plugin SublimeLinter-jshint.linter
SublimeLinter: jshint linter loaded 
reloading plugin SublimeLinter-pyyaml.linter
SublimeLinter: pyyaml linter loaded 
reloading plugin SublimeLinter-ruby.linter
SublimeLinter: ruby linter loaded 
reloading plugin Sublimerge Pro.Sublimerge
reloading plugin Themr.themr
reloading plugin Vintageous.__init__
reloading plugin Vintageous.builder
reloading plugin Vintageous.dev_cmds
reloading plugin Vintageous.ex_commands
reloading plugin Vintageous.ex_main
reloading plugin Vintageous.ex_motions
reloading plugin Vintageous.jump_list_cmds
reloading plugin Vintageous.modelines
reloading plugin Vintageous.state
reloading plugin Vintageous.test_runner
reloading plugin Vintageous.toplist
reloading plugin Vintageous.xactions
reloading plugin Vintageous.xmotions
reloading plugin Vintageous.xsupport
reloading plugin Vintageous.xsupport_mouse
reloading plugin WordCount.WordCount
reloading plugin Anaconda.anaconda
reloading plugin Emmet Style Reflector.emmet_style_reflector
reloading plugin HTML-CSS-JS Prettify.HTMLPrettify
reloading plugin PlainTasks.PlainTasks
reloading plugin SublimeLinter.commands
reloading plugin SublimeLinter.sublimelinter
reloading plugin SublimeREPL.__init__
reloading plugin SublimeREPL.completions
reloading plugin SublimeREPL.lang_integration
reloading plugin SublimeREPL.run_existing_command
reloading plugin SublimeREPL.sublimerepl
reloading plugin SublimeREPL.sublimerepl_build_system_hack
reloading plugin SublimeREPL.text_transfer
plugins loaded
schemr ready
themr ready
SublimeLinter: debug mode: on 
SublimeLinter: temp directory: /tmp/SublimeLinter3 
SublimeLinter: find_python(version='3', script=None, module=None) 
SublimeLinter: find_python: requested version = {'minor': None, 'major': 3} 
SublimeLinter: user shell: /bin/bash 
SublimeLinter: computed PATH using /bin/bash:
~/npm/bin/
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games

SublimeLinter: find_posix_python: python3 => /usr/bin/python3 
SublimeLinter: find_python: system python = /usr/bin/python3 
SublimeLinter: find_python: available version = {'minor': 4, 'major': 3} 
SublimeLinter: find_python: <= ('/usr/bin/python3', None, 3, 4) 
SublimeLinter: sys.path for /usr/bin/python3:
/usr/lib/python3.4
/usr/lib/python3.4/plat-x86_64-linux-gnu
/usr/lib/python3.4/lib-dynload
/usr/local/lib/python3.4/dist-packages
/usr/lib/python3/dist-packages

SublimeLinter: flake8 imported <module 'flake8.engine' from '/usr/local/lib/python3.4/dist-packages/flake8/engine.py'> 
SublimeLinter: pyyaml imported <module 'yaml' from '/usr/local/lib/python3.4/dist-packages/yaml/__init__.py'> 
SublimeLinter: ENV['GEM_HOME'] = 'None' 
Emmet: No need to update PyV8
SublimeLinter: found existing Rails syntax, version 1 
found 57 files for base name Main.sublime-menu
SublimeLinter: found existing HTML syntax, version 3 
['git', 'push']
Package Control: Installing 1 upgrades
ignored packages updated to: [Markdown, Vintage, Sublimerge Pro]
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
unloading plugin Sublimerge Pro.Sublimerge
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
generating syntax summary
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
found 56 files for base name Main.sublime-menu
found 1 files for base name predawn.sublime-theme
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
generating syntax summary
found 26 files for base name Default.sublime-keymap
found 3 files for base name Default.sublime-mousemap
loading pointer bindings
theme loaded
loading pointer bindings
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name predawn.sublime-theme
theme loaded
Package Control: Upgraded Sublimerge Pro to v2.8.9
ignored packages updated to: [Markdown, Vintage]
found 1 files for base name predawn.sublime-theme
reloading Packages/User/Package Control.sublime-settings
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
reloading plugin Sublimerge Pro.Sublimerge
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
generating syntax summary
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
found 57 files for base name Main.sublime-menu
reloading Packages/Sublimerge Pro/Custom Comparisons.sublime-settings
reloading Packages/Sublimerge Pro/Sublimerge.sublime-settings
found 27 files for base name Default.sublime-keymap
found 4 files for base name Default.sublime-mousemap
theme loaded
loading pointer bindings
reloading Packages/User/Preferences.sublime-settings
loading pointer bindings
found 1 files for base name predawn.sublime-theme
theme loaded
@aparajita

This comment has been minimized.

Show comment
Hide comment
@aparajita

aparajita Aug 11, 2014

Contributor

Like I said at the beginning, nvm isn't supported. I kind of knew what I was talking about.

nvm works by modifying PATH (or by looking at a .nvmrc file) in the current shell, and thus is only effective when running node from the shell. SublimeLinter isn't running in your shell's environment, it's running in Sublime Text's environment, which is inherited from the shell it is launched from. But if the application is launched, it doesn't inherit from a shell.

The first line of jshint is #!/usr/bin/env node. Within Sublime Text, /usr/bin/env will look in PATH that is set by SublimeLinter, which knows nothing about nvm. Adding ~/npm/bin to the paths doesn't help because that isn't where nvm puts node executables, it's something like ~/.nvm/v0.11.0/bin/node.

So like I said, nvm isn't supported currently because it only works within the exact shell from which you issue commands. In fact, even within a shell, as soon as you open a new shell, it has no idea that nvm has modified PATH. You can have different versions of node running in different shells simultaneously. So how is SublimeLinter supposed to know which one you want it to use?

Support could be added for .nvmrc files, but that will have to be done by someone else. This is open source, I welcome contributions.

Contributor

aparajita commented Aug 11, 2014

Like I said at the beginning, nvm isn't supported. I kind of knew what I was talking about.

nvm works by modifying PATH (or by looking at a .nvmrc file) in the current shell, and thus is only effective when running node from the shell. SublimeLinter isn't running in your shell's environment, it's running in Sublime Text's environment, which is inherited from the shell it is launched from. But if the application is launched, it doesn't inherit from a shell.

The first line of jshint is #!/usr/bin/env node. Within Sublime Text, /usr/bin/env will look in PATH that is set by SublimeLinter, which knows nothing about nvm. Adding ~/npm/bin to the paths doesn't help because that isn't where nvm puts node executables, it's something like ~/.nvm/v0.11.0/bin/node.

So like I said, nvm isn't supported currently because it only works within the exact shell from which you issue commands. In fact, even within a shell, as soon as you open a new shell, it has no idea that nvm has modified PATH. You can have different versions of node running in different shells simultaneously. So how is SublimeLinter supposed to know which one you want it to use?

Support could be added for .nvmrc files, but that will have to be done by someone else. This is open source, I welcome contributions.

@majimboo

This comment has been minimized.

Show comment
Hide comment

+1

@aparajita

This comment has been minimized.

Show comment
Hide comment
@aparajita

aparajita Aug 21, 2014

Contributor

@majimboo Sorry to say that votes won't help. Someone (other than me) has to come forward and implement nvm support.

Contributor

aparajita commented Aug 21, 2014

@majimboo Sorry to say that votes won't help. Someone (other than me) has to come forward and implement nvm support.

@fronteed

This comment has been minimized.

Show comment
Hide comment
@fronteed

fronteed Oct 6, 2014

This code works well for the latest node installed through nvm:

"paths": {
    "linux": [],
    "osx": [
        "~/.nvm/v0.10.32/lib/node_modules/jshint/bin"
    ],
    "windows": []
},

fronteed commented Oct 6, 2014

This code works well for the latest node installed through nvm:

"paths": {
    "linux": [],
    "osx": [
        "~/.nvm/v0.10.32/lib/node_modules/jshint/bin"
    ],
    "windows": []
},
@majimboo

This comment has been minimized.

Show comment
Hide comment
@majimboo

majimboo Oct 6, 2014

Actually this can easily be fixed by aliasing the version with nvm to default. Restart. Profit.

majimboo commented Oct 6, 2014

Actually this can easily be fixed by aliasing the version with nvm to default. Restart. Profit.

@borestad

This comment has been minimized.

Show comment
Hide comment
@borestad

borestad Nov 4, 2014

This is one of the (many) reasons I use n instead of nvm:
https://github.com/tj/n
Works flawless with sublime

This may also be an option (haven't tried it myself)
https://github.com/isaacs/nave

borestad commented Nov 4, 2014

This is one of the (many) reasons I use n instead of nvm:
https://github.com/tj/n
Works flawless with sublime

This may also be an option (haven't tried it myself)
https://github.com/isaacs/nave

@andrewdeandrade

This comment has been minimized.

Show comment
Hide comment
@andrewdeandrade

andrewdeandrade Dec 4, 2014

Contributor

For those interested in this issue, you may want to check out the NodeLinter class I added recently. It's a work in progress, but I'm looking to support the following features:

  • local binary support (not only global binaries)
  • setting to only enabling a linter if that linter is a dependency or devDependency
  • don't disable the linter if the global binary is missing, but a local binary exists.

I don't see any reason why nvm support couldn't be added to the NodeLinter class.

Another great feature, which some might think goes too far, but would be super cool would be to have a mapping from module name to sublimelinter plugin and automatically install a missing linter plugin (disabled by default of course) if it detects that a Node project depends on that linter.

https://github.com/SublimeLinter/SublimeLinter3/blob/master/lint/node_linter.py

Contributor

andrewdeandrade commented Dec 4, 2014

For those interested in this issue, you may want to check out the NodeLinter class I added recently. It's a work in progress, but I'm looking to support the following features:

  • local binary support (not only global binaries)
  • setting to only enabling a linter if that linter is a dependency or devDependency
  • don't disable the linter if the global binary is missing, but a local binary exists.

I don't see any reason why nvm support couldn't be added to the NodeLinter class.

Another great feature, which some might think goes too far, but would be super cool would be to have a mapping from module name to sublimelinter plugin and automatically install a missing linter plugin (disabled by default of course) if it detects that a Node project depends on that linter.

https://github.com/SublimeLinter/SublimeLinter3/blob/master/lint/node_linter.py

@ruimarinho

This comment has been minimized.

Show comment
Hide comment
@ruimarinho

ruimarinho Feb 17, 2015

From my experience, there is absolutely no problem using nvm with SublimeLinter. Here's the no-frills edition for those using zsh and iojs. Your mileage may vary for other combinations.

  • Install nvm (I've opted for the homebrew version):
brew install nvm
  • Install iojs:
nvm install iojs
nvm use iojs
  • Make sure your .zshenv sets up the environment correctly (snippet sourced from the wonderful prezto framework):
# Ensure that a non-login, non-interactive shell has a defined environment.
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
  source "${ZDOTDIR:-$HOME}/.zprofile"
fi
  • Load the nvm script from ~/.zprofile. I personally prefer setting the NVM_DIR env var to my home dir, but this is entirely optional:
# Set download dir
export NVM_DIR=~/.nvm

# Load nvm script
if [[ -s $(brew --prefix nvm)/nvm.sh ]]; then
  source $(brew --prefix nvm)/nvm.sh
fi
  • Install the linter modules you want to have available through SublimeLinter. I've chosen jshint and jscs. The -g arguments makes it a global installation, so the binaries will be available at ~/.nvm/versions/io.js/v1.2.0/bin/ due to my NVM_DIR setting.
npm install -g jshint jscs
  • Open Sublime Text 3, install SublimeLinter, then SublimeLinter-jshint and lastly SublimeLinter-jscs. That's it!
  • Lint away :)

Hope this helps!

From my experience, there is absolutely no problem using nvm with SublimeLinter. Here's the no-frills edition for those using zsh and iojs. Your mileage may vary for other combinations.

  • Install nvm (I've opted for the homebrew version):
brew install nvm
  • Install iojs:
nvm install iojs
nvm use iojs
  • Make sure your .zshenv sets up the environment correctly (snippet sourced from the wonderful prezto framework):
# Ensure that a non-login, non-interactive shell has a defined environment.
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
  source "${ZDOTDIR:-$HOME}/.zprofile"
fi
  • Load the nvm script from ~/.zprofile. I personally prefer setting the NVM_DIR env var to my home dir, but this is entirely optional:
# Set download dir
export NVM_DIR=~/.nvm

# Load nvm script
if [[ -s $(brew --prefix nvm)/nvm.sh ]]; then
  source $(brew --prefix nvm)/nvm.sh
fi
  • Install the linter modules you want to have available through SublimeLinter. I've chosen jshint and jscs. The -g arguments makes it a global installation, so the binaries will be available at ~/.nvm/versions/io.js/v1.2.0/bin/ due to my NVM_DIR setting.
npm install -g jshint jscs
  • Open Sublime Text 3, install SublimeLinter, then SublimeLinter-jshint and lastly SublimeLinter-jscs. That's it!
  • Lint away :)

Hope this helps!

@vasyan

This comment has been minimized.

Show comment
Hide comment
@vasyan

vasyan Feb 21, 2015

@majimboo It's works great! Thanks.

vasyan commented Feb 21, 2015

@majimboo It's works great! Thanks.

@andycaramba

This comment has been minimized.

Show comment
Hide comment
@andycaramba

andycaramba Mar 7, 2015

It works for me

"paths": {
    "linux": [],
    "osx": [
        # I have installed jshint here
        "/PATH/TO/HOMEDIR/node_modules/.bin/",
        # Without this line a got error
        # SublimeLinter: WARNING: no jshint version could be extracted from:
        # env: node: No such file or directory
        "/PATH/TO/HOMEDIR/.nvm/current/bin/"
    ],
    "windows": []
},

It works for me

"paths": {
    "linux": [],
    "osx": [
        # I have installed jshint here
        "/PATH/TO/HOMEDIR/node_modules/.bin/",
        # Without this line a got error
        # SublimeLinter: WARNING: no jshint version could be extracted from:
        # env: node: No such file or directory
        "/PATH/TO/HOMEDIR/.nvm/current/bin/"
    ],
    "windows": []
},
@cvbuelow

This comment has been minimized.

Show comment
Hide comment
@cvbuelow

cvbuelow Mar 28, 2015

I was having issues but once I did nvm alias default v0.12.1 all was good

I was having issues but once I did nvm alias default v0.12.1 all was good

@chrisl8

This comment has been minimized.

Show comment
Hide comment
@chrisl8

chrisl8 Aug 11, 2015

I solved this problem by adding the following:

export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh"  ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
nvm use stable

to ~/.bash_profile
as explained here:
http://www.sublimelinter.com/en/latest/troubleshooting.html#adjusting-shell-startup-files

I think the problem is solved by the documentation, but I hope my comment will help others who find their way here via web search.

chrisl8 commented Aug 11, 2015

I solved this problem by adding the following:

export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh"  ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
nvm use stable

to ~/.bash_profile
as explained here:
http://www.sublimelinter.com/en/latest/troubleshooting.html#adjusting-shell-startup-files

I think the problem is solved by the documentation, but I hope my comment will help others who find their way here via web search.

@chauthai

This comment has been minimized.

Show comment
Hide comment
@chauthai

chauthai Sep 8, 2015

@chrisl8 thanks for your help!
It seems Sublime Text defaults to the bash shell on MacOSX even if you set zsh as your default shell in Terminal.
Your solution finally enabled my eslint!

chauthai commented Sep 8, 2015

@chrisl8 thanks for your help!
It seems Sublime Text defaults to the bash shell on MacOSX even if you set zsh as your default shell in Terminal.
Your solution finally enabled my eslint!

@arxpoetica

This comment has been minimized.

Show comment
Hide comment
@arxpoetica

arxpoetica Sep 9, 2015

Fixed my problem too. Thx.

Fixed my problem too. Thx.

@thymikee

This comment has been minimized.

Show comment
Hide comment
@thymikee

thymikee Oct 13, 2015

Anyone having problems with @chrisl8 answer not working on OSX:

  1. If you use zsh paste this export NVM_DIR="${HOME}/.nvm" into ~/.zprofile (create if not present)
  2. Cmd+Shift+P, search for SublimeLinter: Clear Caches and clear the cache.

Anyone having problems with @chrisl8 answer not working on OSX:

  1. If you use zsh paste this export NVM_DIR="${HOME}/.nvm" into ~/.zprofile (create if not present)
  2. Cmd+Shift+P, search for SublimeLinter: Clear Caches and clear the cache.
@ambodi

This comment has been minimized.

Show comment
Hide comment
@ambodi

ambodi Nov 6, 2015

@aparajita Why not supported? Isn't it as simple as what HTML Prettify guys did by introducing a way to have a config saying where node is installed if its not installed already?

ambodi commented Nov 6, 2015

@aparajita Why not supported? Isn't it as simple as what HTML Prettify guys did by introducing a way to have a config saying where node is installed if its not installed already?

@groteworld

This comment has been minimized.

Show comment
Hide comment
@groteworld

groteworld Nov 6, 2015

Member

Not saying it can't be done, just saying it isn't currently. If it seems simple, please feel free to contribute! Thanks!

Member

groteworld commented Nov 6, 2015

Not saying it can't be done, just saying it isn't currently. If it seems simple, please feel free to contribute! Thanks!

@btmurrell

This comment has been minimized.

Show comment
Hide comment
@btmurrell

btmurrell Dec 16, 2015

@borestad, thanks for the pointer to n this kicks ass over nvm, and as advertised works seamlessly with sublime.

@borestad, thanks for the pointer to n this kicks ass over nvm, and as advertised works seamlessly with sublime.

@leomeloxp

This comment has been minimized.

Show comment
Hide comment
@leomeloxp

leomeloxp Dec 29, 2015

Did what @thymikee suggested and it fixed it for me. I guess it makes sense that sublime doesn't look at zshrc or bashrc, since at least on linux only .*profile gets read when you log in and startx.

Did what @thymikee suggested and it fixed it for me. I guess it makes sense that sublime doesn't look at zshrc or bashrc, since at least on linux only .*profile gets read when you log in and startx.

@groteworld

This comment has been minimized.

Show comment
Hide comment
@groteworld

groteworld Jan 19, 2016

Member

[REDACTED COMMENT]

@yrodriguezo, Please watch your language, that is not appropriate behavior.

Member

groteworld commented Jan 19, 2016

[REDACTED COMMENT]

@yrodriguezo, Please watch your language, that is not appropriate behavior.

@jawshooah

This comment has been minimized.

Show comment
Hide comment
@jawshooah

jawshooah Jan 19, 2016

Member

@yrodriguezo That kind of language is not welcome here, and your comment is incoherent besides. Please leave.

Member

jawshooah commented Jan 19, 2016

@yrodriguezo That kind of language is not welcome here, and your comment is incoherent besides. Please leave.

@wldcordeiro

This comment has been minimized.

Show comment
Hide comment
@wldcordeiro

wldcordeiro Jan 27, 2016

So since people have posted workarounds I'm closing the issue.

So since people have posted workarounds I'm closing the issue.

@vogelino

This comment has been minimized.

Show comment
Hide comment
@vogelino

vogelino Jan 29, 2016

@chrisl8 Mine too! Thx!

With ❤️ with two years delay!

@chrisl8 Mine too! Thx!

With ❤️ with two years delay!

@nodkrot

This comment has been minimized.

Show comment
Hide comment
@nodkrot

nodkrot Jul 25, 2016

Here is what I did (sort of the combination). In your ~/.zprofile:

#
#  NVM
#

export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh"  ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

And then Cmd+Shift+P, search for SublimeLinter: Clear Caches and clear the cache. (not sure if this was necessary).

I use zsh with prezto this is my .zshenv

#
# Defines environment variables.
#
# Authors:
#   Sorin Ionescu <sorin.ionescu@gmail.com>
#

# Ensure that a non-login, non-interactive shell has a defined environment.
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
  source "${ZDOTDIR:-$HOME}/.zprofile"
fi

nodkrot commented Jul 25, 2016

Here is what I did (sort of the combination). In your ~/.zprofile:

#
#  NVM
#

export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh"  ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

And then Cmd+Shift+P, search for SublimeLinter: Clear Caches and clear the cache. (not sure if this was necessary).

I use zsh with prezto this is my .zshenv

#
# Defines environment variables.
#
# Authors:
#   Sorin Ionescu <sorin.ionescu@gmail.com>
#

# Ensure that a non-login, non-interactive shell has a defined environment.
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
  source "${ZDOTDIR:-$HOME}/.zprofile"
fi
@lvl99

This comment has been minimized.

Show comment
Hide comment
@lvl99

lvl99 Aug 17, 2016

I saw that there was a point on the SublimeLinter-jshint page:

If you are using nvm and zsh, ensure that the line to load nvm is in .zshenv and not .zshrc.

I then added my nvm initialiser shell script (the line above which @nodkrot has written) into the .zshenv file, cleared SublimeLinter's cache and restarted Sublime 3. I had SublimeLinter's debug mode on and it was able to locate node via nvm in the path with no errors locating my all my linter plugins too.

lvl99 commented Aug 17, 2016

I saw that there was a point on the SublimeLinter-jshint page:

If you are using nvm and zsh, ensure that the line to load nvm is in .zshenv and not .zshrc.

I then added my nvm initialiser shell script (the line above which @nodkrot has written) into the .zshenv file, cleared SublimeLinter's cache and restarted Sublime 3. I had SublimeLinter's debug mode on and it was able to locate node via nvm in the path with no errors locating my all my linter plugins too.

@sqren

This comment has been minimized.

Show comment
Hide comment
@sqren

sqren Sep 9, 2016

This is how I solved it:

Open "SublimeLinter Settings" and add path to Node:

"paths": {
    "linux": [],
    "osx": ["~/.nvm/versions/node/v4.5.0/bin"],
    "windows": []
},

And remember to read the docs :)

sqren commented Sep 9, 2016

This is how I solved it:

Open "SublimeLinter Settings" and add path to Node:

"paths": {
    "linux": [],
    "osx": ["~/.nvm/versions/node/v4.5.0/bin"],
    "windows": []
},

And remember to read the docs :)

@newhouse

This comment has been minimized.

Show comment
Hide comment
@newhouse

newhouse Dec 23, 2016

For me, like @nodkrot , the problem was that I was using NVM and ZSH. In fact, I'm using Oh My Zsh as well.
I simply had to move the NVM stuff from .zshrc to .zprofiile, restart ST3, and it was fine. This is because .zshrc isn't loaded by the shell that Sublime uses I guess.

By the way, this was also staring me in the face in the SublimeLinter-eslint docs:

"If you are using nvm and zsh, ensure that the line to load nvm is in .zprofile and not .zshrc."

This problem was, I believe, also exacerbated by the fact that I had no "system" installation of Node...otherwise this would have presented itself differently, or not at all since it would have found a node.

newhouse commented Dec 23, 2016

For me, like @nodkrot , the problem was that I was using NVM and ZSH. In fact, I'm using Oh My Zsh as well.
I simply had to move the NVM stuff from .zshrc to .zprofiile, restart ST3, and it was fine. This is because .zshrc isn't loaded by the shell that Sublime uses I guess.

By the way, this was also staring me in the face in the SublimeLinter-eslint docs:

"If you are using nvm and zsh, ensure that the line to load nvm is in .zprofile and not .zshrc."

This problem was, I believe, also exacerbated by the fact that I had no "system" installation of Node...otherwise this would have presented itself differently, or not at all since it would have found a node.

@flyskywhy

This comment has been minimized.

Show comment
Hide comment
@flyskywhy

flyskywhy Mar 7, 2018

with version 4.0.5, paths eg "linux":["~/.nvm/v0.11.0/bin/node"] can't work anymore, I have to

sudo ln -s ~/.nvm/v0.11.0/bin/node /usr/bin/node

with version 4.0.5, paths eg "linux":["~/.nvm/v0.11.0/bin/node"] can't work anymore, I have to

sudo ln -s ~/.nvm/v0.11.0/bin/node /usr/bin/node
@kaste

This comment has been minimized.

Show comment
Hide comment
@kaste

kaste Mar 7, 2018

Contributor

I thought that this is documented in the README, but it isn't. Happy to take documentation PRs.

Here is some info for the new SL4

https://github.com/SublimeLinter/SublimeLinter-eslint/blob/4ecc891b6162e242b2d91a6c435e7ec68e29036a/messages/4.0.1.txt#L24-L36

Contributor

kaste commented Mar 7, 2018

I thought that this is documented in the README, but it isn't. Happy to take documentation PRs.

Here is some info for the new SL4

https://github.com/SublimeLinter/SublimeLinter-eslint/blob/4ecc891b6162e242b2d91a6c435e7ec68e29036a/messages/4.0.1.txt#L24-L36

@elmigranto

This comment has been minimized.

Show comment
Hide comment
@elmigranto

elmigranto Mar 13, 2018

Worked for me:

  • open your shell with PATH set as you want it
    (pointing to correct node, etc.);
  • execute subl
    (which is cli command to launch Sublime Text);
  • ...
  • PROFIT!!1.!!!

elmigranto commented Mar 13, 2018

Worked for me:

  • open your shell with PATH set as you want it
    (pointing to correct node, etc.);
  • execute subl
    (which is cli command to launch Sublime Text);
  • ...
  • PROFIT!!1.!!!
@jshado1

This comment has been minimized.

Show comment
Hide comment
@jshado1

jshado1 Mar 28, 2018

This sounds like it could be caused by SublimeTextIssues/Core#1877

For me, I get the error in the OP, but then SublimeLinter kicks in after a few seconds.

jshado1 commented Mar 28, 2018

This sounds like it could be caused by SublimeTextIssues/Core#1877

For me, I get the error in the OP, but then SublimeLinter kicks in after a few seconds.

@brainthinks

This comment has been minimized.

Show comment
Hide comment
@brainthinks

brainthinks Apr 5, 2018

@kaste - thank you! Here is how I got my n installation to work:

"linters": {
  "eslint": {
    "disable": false,
    "args": [],
    "excludes": [],
    "env": {
      "PATH": "/home/user/n/bin:$PATH"
    }
  }
}

I got the path to my n node executable by running:

which node

@kaste - thank you! Here is how I got my n installation to work:

"linters": {
  "eslint": {
    "disable": false,
    "args": [],
    "excludes": [],
    "env": {
      "PATH": "/home/user/n/bin:$PATH"
    }
  }
}

I got the path to my n node executable by running:

which node

@theSekyi

This comment has been minimized.

Show comment
Hide comment
@theSekyi

theSekyi Apr 12, 2018

@brainthinks what does $PATH do? Do I add it to the end of my which node output?

@brainthinks what does $PATH do? Do I add it to the end of my which node output?

@maxmckenzie

This comment has been minimized.

Show comment
Hide comment
@maxmckenzie

maxmckenzie Apr 17, 2018

I do not think it is a good idea. as most comments here suggest to add "osx": ["~/.nvm/versions/node/v4.5.0/bin"], to your sublime lint conf

note the hardcoded version of node that is referenced node/v4.5.0

maybe you're just working on a single app. Maybe your only using one version of node for all you developer needs.

but as this is related with nvm one assumes there are multiple versions of node in play.

on linux you just reference .nvm in your home folder "linux": ["/home/xam/.nvm"],

Rather than running eslint against a specific version of node each time as is the case with the above.

I do not think it is a good idea. as most comments here suggest to add "osx": ["~/.nvm/versions/node/v4.5.0/bin"], to your sublime lint conf

note the hardcoded version of node that is referenced node/v4.5.0

maybe you're just working on a single app. Maybe your only using one version of node for all you developer needs.

but as this is related with nvm one assumes there are multiple versions of node in play.

on linux you just reference .nvm in your home folder "linux": ["/home/xam/.nvm"],

Rather than running eslint against a specific version of node each time as is the case with the above.

@rreckonerr

This comment has been minimized.

Show comment
Hide comment
@rreckonerr

rreckonerr May 14, 2018

Had the same problem running Linux Mint 18.3 and node installed with nvm.
First problem I got was SublimeLinter: WARNING: jshint cannot locate 'jshint'. To fix it add

    "paths": {
        "linux": [
            "~/.nvm/versions/node/v8.11.1/bin",
        ],
        "osx": [],
        "windows": []
    },

to your ~/.config/sublime-text-3/Packages/User/SublimeLinter.sublime-settings or Preferences > Package Settings > SublimeLinter > Settings.

And the second problem was /usr/bin/env: ‘node’: No such file or directory. Fixed it by adding to the same SublimeLinter user settings file:

  "linters": {
       "jshint": {
           "disable": false,
           "args": [],
           "excludes": [],
           "env": {
               "PATH": "~/.nvm/versions/node/v8.11.1/bin:$PATH"
           },
       },
   },

@brainthinks Thank you for the "PATH": "/home/user/n/bin:$PATH"

rreckonerr commented May 14, 2018

Had the same problem running Linux Mint 18.3 and node installed with nvm.
First problem I got was SublimeLinter: WARNING: jshint cannot locate 'jshint'. To fix it add

    "paths": {
        "linux": [
            "~/.nvm/versions/node/v8.11.1/bin",
        ],
        "osx": [],
        "windows": []
    },

to your ~/.config/sublime-text-3/Packages/User/SublimeLinter.sublime-settings or Preferences > Package Settings > SublimeLinter > Settings.

And the second problem was /usr/bin/env: ‘node’: No such file or directory. Fixed it by adding to the same SublimeLinter user settings file:

  "linters": {
       "jshint": {
           "disable": false,
           "args": [],
           "excludes": [],
           "env": {
               "PATH": "~/.nvm/versions/node/v8.11.1/bin:$PATH"
           },
       },
   },

@brainthinks Thank you for the "PATH": "/home/user/n/bin:$PATH"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment