I don’t have any experience with nvm
, but assuming that Fix Mac Path doesn’t work, I would have to imagine that nvm is the reason why.
The git repository mentions a shell script that needs to be sourced and possibly some special command you need to use to either invoke node or tell the terminal which version to use for this session.
Specifically, it says this:
nvm use will not, by default, create a “current” symlink. Set $NVM_SYMLINK_CURRENT to “true” to enable this behavior, which is sometimes useful for IDEs. Note that using nvm in multiple shell tabs with this environment variable enabled can cause race conditions.
That makes it sound like the extra step may be needed. If that’s the case, I would imagine that the reason why it works when you run sublime from the terminal is because in that case you’ve already run the command that things up.
The plugin itself searches the path for the node executable and goes out of its way to also look inside $NVM_BIN
for the binary. Ensuring that that variable it set to the correct value from your .bash_profile
file may solve the problem as well.
In a pinch, you can add the node_path
setting to your preferences file, and set it to the fully qualified path to the version of node that you want to use (including the name of the executable). For me (not using nvm) that would look like this:
"node_path": "/home/tmartin/local/nodejs/bin/node"