I'm using nvm with the --no-use flag as that was causing my terminal to start massively slow . That means than I always need to run nvm use <NODE_VERSION> on new terminal tabs in order to be able to use node or npm.
I have a project with some Git Hooks configured using ghooks, so each time I move to a different branch or commit something, I get different type of errors in both WebStorm and SourceTree, all pointing oout that node could not be found. These are some of them:
SourceTree checkout:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c
credential.helper=sourcetree checkout BRANCH
Switched to branch 'BRANCH'
M ...
M ...
...
env: node: No such file or directory
Completed with errors, see above
WebStorm commit:
Commit failed with error
0 files committed, 3 files failed to commit: COMMIT_MESSAGE env: node: No such file or directory
In WebStorm, I thought that manually setting the node version to use (under Preferences > Languages & Frameworks > Node.js and NPM > Node interpreter) would fix the issue, but it didn't.
I'm using WebStorm 2016.1.3, Build #WS-145.1616.
Removing the --no-use flag would fix it of course, but that's not an option as then the terminal becomes super slow at startup. Any other way to get around that?