I use PhpStorm (though this should also apply to WebStorm) to develop node projects.
I manage my node versions via nvm
and hence always have multiple node versions available.
In the past, I always set a specific node version for a run configuration, e.g.
~/.nvm/versions/node/v10.16.2.0/bin/node
which means that once I changed my node version to e.g. v11.15.0, the file link would become invalid and I have to update it to
~/.nvm/versions/node/v11.15.0/bin/node
This becomes tedious, and I can have a lot of run configs per project. Now I realized, I could set the node interpreter to "Project" via:
and it would use the one defined in the general node settings:
This way, if I change the node version I can just change the project setting and it would be applied for all the run configuration using the project setting.
But now I have a lot of already set run configs, and I would have to change all of them one by one.
Hence: Is there a way to set all run configs at once? (Also, at best this would also reset the node interpreters for tslint / typescript and other tools.)
Or do I have to do it manually?
You have to do this manually - specific interpreters chosen in run configurations (and other Node.js-dependent configs) always override the defaults, so changing the interpreter in one place won't update others. You have to set interpreter to Project
alias everywhere, then next time you change it in Settings | Languages & Frameworks | Node.js and NPM, all configs will be auto-updated