SublimeLinter-contrib-sass-lint
SublimeLinter-contrib-sass-lint copied to clipboard
Error: Sass-lint failed: missing path
Hello,
I can't get sass-lint to work.. In my Sublime document on line 1 it returns: Error: Sass-lint filed: missing path I tried adding the path /usr/local/bin/sass-lint to my SublimeLinter settings but same result.
Any idea how to solve this?
What happens if you run a sass-lint --version in a terminal? That should work else your path is not setup correctly.
How did you install sass-lint? npm -g install sass-lint should do it.
sass-lint --version returns 1.5.0
I used: sudo npm install -g sass-lint
What does which sass-lint return?
/usr/local/bin/sass-lint
any idea what's causing this error?
Which platform are you on? OS X?
So it seems your paths are not set up correctly.
Try following this guide http://www.sublimelinter.com/en/latest/troubleshooting.html#debugging-path-problems
So you should add /usr/local/bin/ to your path (either on you machine, which it should be e.g. .profile or .bashrc OR in Sublime).
Thank you for your answer.
Yes OSX.
I opened SublimeLinter.sublime-settings and added:
"paths": { "linux": [], "osx": [ "/usr/local/bin/" ], "windows": [] }
Still same error...
Try following http://www.sublimelinter.com/en/latest/troubleshooting.html#debugging-path-problems
Specifically:
- open sublime console "view + show console"
- click "tools + sublime linter + activate debug mode"
Copy paste everything in the console here :)
Oke, here you go:
startup, version: 3103 osx x64 channel: stable executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text working dir: / packages path: /Users/XXXXXX/Library/Application Support/Sublime Text 3/Packages state path: /Users/XXXXXX/Library/Application Support/Sublime Text 3/Local zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages zip path: /Users/XXXXXX/Library/Application Support/Sublime Text 3/Installed Packages ignored_packages: ["Vintage"] pre session restore time: 0.201845 using gpu buffer for window using gpu buffer for window startup time: 0.253527 no such context .string-double in Packages/SCSS/SCSS.tmLanguage no such context .string-single in Packages/SCSS/SCSS.tmLanguage no such context .media-query-list in Packages/SCSS/SCSS.tmLanguage no such context .string-single in Packages/SCSS/SCSS.tmLanguage no such context .string-double in Packages/SCSS/SCSS.tmLanguage no such context .media-query-list in Packages/SCSS/SCSS.tmLanguage first paint time: 0.327532 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.profile_syntax_definition 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.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 Python.syntax_test_python reloading plugin 0_package_control_loader.00-package_control reloading plugin 0_package_control_loader.02-bz2 reloading plugin Package Control.1_reloader reloading plugin Package Control.2_bootstrap reloading plugin Package Control.Package Control reloading plugin SCSS.scss_completions reloading plugin SublimeLinter-contrib-sass-lint.linter SublimeLinter: sass linter loaded reloading plugin SublimeLinter-jshint.linter SublimeLinter: jshint linter loaded reloading plugin SublimeLinter.commands reloading plugin SublimeLinter.sublimelinter plugins loaded SublimeLinter: debug mode: on SublimeLinter: temp directory: /var/folders/qh/nmn801394sj8gz9k5zp54xdm0000gn/T/SublimeLinter3-XXXXXX SublimeLinter: user shell: /bin/bash SublimeLinter: computed PATH using /bin/bash: /usr/local/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin
SublimeLinter: chdir not set or invalid, using /Users/XXXXXX/Sources/XXXXXX/sass/base SublimeLinter: sass: _colors.scss ['/usr/local/bin/sass-lint', '--verbose', '--no-exit'] SublimeLinter: sass output:
assert.js:89
throw new assert.AssertionError({
^
AssertionError: missing path
at Module.require (module.js:365:3)
at require (internal/module.js:16:19)
at module.exports (/usr/local/lib/node_modules/sass-lint/lib/config.js:73:12)
at Function.sassLint.getConfig (/usr/local/lib/node_modules/sass-lint/index.js:25:10)
at Function.sassLint.lintFiles (/usr/local/lib/node_modules/sass-lint/index.js:162:20)
at detectPattern (/usr/local/lib/node_modules/sass-lint/bin/sass-lint.js:16:18)
at /usr/local/lib/node_modules/sass-lint/bin/sass-lint.js:91:5
at Array.forEach (native)
at Object.
I already reported the issue at Sass-lint, but they pointed me to SublimeLinter-contrib-sass-lint... I'm not sure which of the two is causing the issue...
Any spaces or special characters in your out-commented username and project name XXXXXX?
No not at all....
also found this https://github.com/sasstools/sass-lint/issues/500, but I'm not sure if this is related...
Dug into this a little and it looks like the path of a config file (.sass-lint.yml) isn't being passed to sass-lint, and so it's failing
Thanks @coagmano . Do you have the same issue, or how did you reproduce the issue?
I'm having the same issue on windows and OSX. It appears that sass lint is not scanning the home directory for the sass-lint.yml file. I've successfully gotten it to run with the -c option to specifiy the file on the commandline, but haven't been able to get it to work in sublimelinter.
EDIT: 2 seconds after posting this I closed and reopened sublime text and it worked. No idea what changed.
Just ran into this as well. The .sass-lint.yml file in the root of my project wasn't picked up until after quitting and relaunching Sublime Text.
@cappadona ok thanks for reporting it. It might be expected behaviour with Sublime Linter.
hello - have exact same issue but its not clear to me where i add these paths on macOS.
So you should add /usr/local/bin/ to your path (either on you machine, which it should be e.g. .profile or .bashrc OR in Sublime).
which give me this
which sass-lint
/usr/local/bin/sass-lint
any help appreciated. Linter currently making my life a misery.