I had this problem as well. The issue for me was that the Build Pipeline was using the wrong version of the cli tool.
All we needed to do was add the UiPath Install Platform task in the Pipeline before the UiPath Pack task.
Select the latest Windows CLI version (Not Cross Platform or Windows-Legacy). Don’t worry about the input for the path to the CLI package.
Lastly, recreate the UiPath Pack task.
After that, you may get an error in the UiPath Pack task saying “##[error]Error packaging project: Error: Parameter ‘toolPath’ cannot be null or empty.”
The fix for this was that our projectJsonPath parameter for the UiPath Pack task was pointing to a folder that was one level above where the actual project.json file was. In previous Windows-Legacy project pipelines, this wasn’t an issue for us, but it seems that for this Windows CLI version, it needs to be the exact folder path.
