<target name ="npm-install">
<exec dir="${pathToSomeDir}" executable="npm.cmd" failonerror="true">
<arg value="install" />
</exec>
I am doing npm install with this task which is running fine only if I have nodejs path in my system variable I want to do this task without having nodejs path in the system variable is there any workaround for this? if available please tell for UNIX too. p.s :- in ${pathToSomeDir} there is package.json and scripts etc.
system variableyou mean thePATHvariable you should be able to provide the full path to NodeJS in the command parameter e.g./home/myuse/.nvm/versions/node/v17.3.1/bin/npm.