Error : Is Node.js available during analysis? for node installed with nvm

I am running the sonar scanner locally on my machine. I provide the *sonar.nodejs.*executable path to my node/bin location which looks like
/Users//.nvm/versions/node/v16.16.0/bin
and I get the error -
Error when running: '/Users/<username>/.nvm/versions/node/v16.16.0/bin -v'. Is Node.js available during analysis?
When my colleague ran the same identical command (to run the sonar scanner), he did not see the error however his node was not installed using nvm and was in the typical location where you expect to find the node installed.
Is there a known issue with sonnar-scanner not working with nvm installed node or is there a workaround or something that I am missing here?
The path /Users//.nvm/versions/node/v16.16.0/bin is indeed on my PATH. and node -v works but when I run the command sudo /Users//.nvm/versions/node/v16.16.0/bin -v from terminal, it does not work I get the error command not found.

Hi,

Welcome to the community!

Just to dot the i’s, what version of SonarQube are you using? You can find it in the page footer.

 
Ann