Azure DevOps CI/CD error at UiPath Install Platform Task - Error: ENOENT: no such file or directory

How to solve the error ##[error]Error installing platform: Error: ENOENT: no such file or directory, open 'C:\xxx\_work\_tool\nupkg\UiPath.CLI.Windows.xx.xx.xxxx.xxxxx.nupkg?

Error Description: When running the Pipeline, the error below is shown in the 'UiPath Install Platform' step:

##[error]Error installing platform: Error: ENOENT: no such file or directory, open 'C:\xxx\_work\_tool\nupkg\UiPath.CLI.Windows.xx.xx.xxxx.xxxxx.nupkg

5.png



Root Cause:

  1. Path to CLI's nupkg might be entered when either the CLI has not been placed on the specified path or the specified path has not been created
  2. If installing the default CLI and having access to the UiPath Public Feed, there is no need for the path to be entered
  3. If no access to the UiPath Public Feed, then create the folder -nupkg- at C:\agent\_work\_tool\nupkg then copy the CLI there.


Resolution:
Approach #1

  1. In Azure Pipelines Step/Task, for the UiPath Install Platform, remove the field below and leave it empty. This will allow using the default shipped CLI version of the UiPath Azure DevOps Extension.

  1. After removing that field give it a try once again.
8.png

Results:

7.png


Approach #2: If the pipeline fails to access the UiPath Public Feed and can not download the CLI version chosen from the dropdown list, follow the steps below:

  1. Download the desired CLI version from the UiPath Public Feed
  2. Place the downloaded NUPKG file inside the Agent.Tools directory of the build agent. Remember the path of the NUPKG file inside the Agent.Tools directory. For example, $(Agent.ToolsDirectory)\nupkg\UiPath.CLI.Windows.xx.xx.xxxx.xxxxx.nupkg
  3. Use the InstallPlatform task, and input the path used in step ii inside the Path to CLI's nupkg field.

Example:

9.png

Results:

6.png