The easiest way to install packages in Sublime text is using PackageControl. If you haven’t already installed it and you’re using the latest release of Sublime Text 3, select Tools > Install Package Control...
from the menu to install it. If PackageControl is already installed, this menu item will not be visible.
To install a package, choose Preferences > Package Control
from the menu (under MacOS this is Sublime Text > Preferences > Package Control
to open the command palette with all of the package control commands. From here you select the option to install a package.
There will be delay while the package list downloads (you can see a little progress spinner in the status bar at the bottom of the sublime window showing you that it’s working) and then a list of packages will pop up, and you can select it from there to install it.
With all of that said, as @math2001 mentioned, it doesn’t look like you actually have nodejs
installed. I misread your original post and thought that the error was due to Sublime not being able to find it (this is a common problem on MacOS due to the way it works). As such my original advice won’t help with this particular problem, although it may be a good idea to do it anyway to curtail any weirdness you might run into in the future.
The error message you’re getting says that it’s trying to execute /usr/local/bin/node
but it is failing to do so. Since this contains a specific path, one of two things is wrong here:
-
You have nodejs installed, but it’s not installed in /usr/local/bin
. In that case you need to modify the build system to specify the correct location of the file.
-
You don’t have nodejs installed at all. In that case, you need to download the installer for MacOS and install it. I recommend the pkg
version; Opening that should give you a wizard that walks you through the installation process.
If you are working with option #2 above, watch to see if the installer makes mention of where it’s doing the installation so that if necessary you can modify the sublime build file. It’s been a while since I installed it on my Mac, so I can’t say with 100% certainty that it’s going to put it into /usr/local/bin
.