sonarlint-visualstudio
sonarlint-visualstudio copied to clipboard
Node versions managed by NVM are not detected
Description
When locating a compatible node version for js/ts analysis, we search for node installations found in PATH. However, node installations managed by NVM would not be stored there, but rather under AppData\Roaming\nvm
. This means that we cannot find versions other than the version set by nvm (via nvm use <version>
).
Implications:
- Our analysis might fail due to no compatible node version being found under PATH --> this is fixable by the user by running
nvm use
or manually adding the specific node version to PATH. - The telemetry field MaxNodeJsVersion is not calculated correctly. See also #2997.
TODO:
- [ ] Implement a new
INodeLocationsProvider
that searches for NVM-managed installations.
Is there any update for this?
Even adding nvm path in settings doesn't get recognized.
"sonarlint.pathToNodeExecutable": "~/.nvm/versions/node/v16.17.1/bin/node",
Would appreciate some help, please.
Even adding nvm path in settings doesn't get recognized.
"sonarlint.pathToNodeExecutable": "~/.nvm/versions/node/v16.17.1/bin/node",
@ARehmanMahi this is the SonarLint for Visual Studio repo, not VSCode. Feel free to open issues in our community forum for the appropriate IDE: https://community.sonarsource.com/c/sl/11
Sorry, my bad,
By the way, I had to use the absolute path instead of the Tilda and it worked.
"sonarlint.pathToNodeExecutable": "/home/abdul/.nvm/versions/node/v16.17.1/bin/node",