Skip to content

Instantly share code, notes, and snippets.

@craigvantonder
Created August 21, 2021 12:59
Show Gist options
  • Save craigvantonder/70df153a3721c53b03df175460dbd76e to your computer and use it in GitHub Desktop.
Save craigvantonder/70df153a3721c53b03df175460dbd76e to your computer and use it in GitHub Desktop.
Linux / Sublime Text / NVM / SublimeLinter / SASS / jshint / sass-lint

I am using NodeJS in Ubuntu via NVM and was having and issue with sass-lint in Sublime Text 3, the console shows:

SublimeLinter: WARNING: sass cannot locate 'sass-lint'
Please refer to the readme of this plugin and our troubleshooting guide: http://www.sublimelinter.com/en/stable/troubleshooting.html

Reading the issue on the source repository over here: SublimeLinter/SublimeLinter#128 (comment)

Means that we can do the following in the user configuration for SublimeLinter:

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

And the error is gone but a new one will appear:

SublimeLinter: WARNING: sass output:
/usr/bin/env: ‘node’: No such file or directory

Which means we then need to add the following to the user configuration for SublimeLinter:

{
  "linters": {
    ...
    "sass": {
      "@disable": false,
      "args": [],
      "excludes": [],
      "env": {
        "PATH": "~/.nvm/versions/node/v16.7.0/bin:$PATH"
      }
    }
  },
  "paths": {
    "linux": ["~/.nvm/versions/node/v16.7.0/bin"],
    "osx": [],
    "windows": []
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment