SOLVED | This step requires a node version that does not exist in the agent filesystem | AzureDevOps Agents
Some of the tasks in your Azure DevOps pipeline might fail after you have upgraded your nodejs from one version to another version. This may throw an error as denoted below
This step requires a node version that does not exist in the agent filesystem path: xxx/externals/nodexx/bin/node
The reason this error occurs is some of the default Azure DevOps tasks uses outdated version of nodejs and it gets upgraded from time to time when the task is updated. Scans may indicate nodejs outdated versions as vulnerable. To resolve this you might have upgraded nodejs to a newer version and removed the older version of nodejs from your system and this leads to errors as described below.
There are 2 solutions to this unique problem. you can either go back and install the older version of nodejs (or) you can just rename or copy the nodejs version folder. The 2nd one is much simpler when compared with the 1st one and you can implement it by using the following steps (The hard path is mostly caused by issues with the Azure DevOps tasks)
Solution for the issue: “This step requires a node version that does not exist in the agent filesystem”
-
Go to the directory where node is installed. Generally it would be under externals directory under the agents folder
-
Run the command ls -l to see the list of directories
-
Run the command cp -rf node node10 to copy the nodejs files to node10 directory
By following the above steps you will be able to solve the issue temporarily. The permanent solution is to upgrade the task to a newer version (The newer version becomes available only it has been upgraded by Microsoft)