How to use node from nvm during build?

Answered

Hi,

On Linux, I use nvm to manage my nodejs version. In one of my csproj, I call a node command, but during the build, this one doesn't take the correct nodejs version.

If I build from the terminal, using `dotnet build`, everything is Ok.

Is it possible to configure Rider to use the nodejs version from nvm?

Thanks for your help!

0
2 comments
Avatar
Permanently deleted user

I just had the same problem. You need to initialise nvm in non-interactive shells as well.

For zsh just put "source /usr/share/nvm/init.nvm.sh" and the code from https://github.com/nvm-sh/nvm#zsh inside your .zshenv. If you are using bash or something else, I suspect that it works very similar.

0

Even though I set up my zsh as suggested above, it still fails for me

0

Please sign in to leave a comment.