Skip to content

Installation

Lorenzo Pichilli edited this page Jan 8, 2018 · 16 revisions

With Package Control:

  • Run “Package Control: Install Package” command or click to the Preferences > Package Control menu item, find and install JavaScript Enhancements plugin.

Manually:

  1. Download latest release and unzip it into your Packages folder (go to Preferences > Browse Packages... menu item to open this folder)
  2. Rename the folder with JavaScript Enhancements name (THIS STEP IS IMPORTANT).

Fixing node.js and npm custom path

If the plugin gives to you message errors like Error during installation: "node.js" seems not installed on your system... but instead you have installed node.js and npm (for example using nvm), then you could try to set your custom path in the Global settings of the plugin and then restart Sublime Text.

If this doesn't work too, then you could try to add the custom path that contains binaries of node.js and npm in the PATH key-value on the same JavaScript Enhancements settings file. This variable will be appended to the $PATH environment variable, so you could use the same syntax in it. After this you need to restart Sublime Text.

Example of global settings for Linux that uses nvm:

{
  // ...

  "PATH": ":/home/lorenzo/.nvm/versions/node/v9.2.0/bin",
  "node_js_custom_path": "node",
  "npm_custom_path": "npm",

  // ...
}

For Linux-based OS REMEMBER to add : (for Windows OS REMEMBER to add ;) at the begin of the PATH value!! Like I already said, it uses the same syntax for the $PATH environment variable.

Example of global settings for Mac OS X that uses nvm (in my case the PATH variable is not setted and it works fine):

{
  // ...

  "PATH": "",
  "node_js_custom_path": "/Users/lorenzo/.nvm/versions/node/v8.8.1/bin/node",
  "npm_custom_path": "/Users/lorenzo/.nvm/versions/node/v8.8.1/bin/npm",

  // ...
}