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
Root Cause:
- 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
- If installing the default CLI and having access to the UiPath Public Feed, there is no need for the path to be entered
- 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
- 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.
- After removing that field give it a try once again.
Results:
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:
- Download the desired CLI version from the UiPath Public Feed
- 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
- Use the InstallPlatform task, and input the path used in step ii inside the Path to CLI's nupkg field.
Example:
Results: