powershell build step in Teamcity does not behave the same way as "Open Terminal" for Agent

I have TeamCity Deployment, where I want to use different Node versions for different Projects. I have added the frontend-maven-plugin which installs different node versions, and have manually installed the version in the Agent machine. Now I am trying to add a Build-Step as a command line before running Maven, to change the node version. I am trying to use "nvm use 18" which should change the node version.

This works fine, when I try it from the terminal which opens when I click on "Open Terminal" at the Agent window. But when I perform the same thing by adding a Build step (Either command line or powershell) it runs forever and does not actually change the version.

Could someone please guide me as to what could be the issue?

0
1 comment

Hi Sunil, hope you are doing well. I am also facing the same issue, I am able to run all nvm commands from agent , teamcity agent terminal as well . While running nvm commands from  build step it keep running for infinite time. 

Could you please suggest some steps that might have helped you in fixing this issue?

0

Please sign in to leave a comment.