ARTIFACTORY: How to resolve the Azure DevOps Pipeline error: "##[error]Error: Failed rmRF: fs.rmSync is not a function" when using "JFrog Extension"

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
Yunzong Guo
articleNumber
000007009
FirstPublishedDate
2026-06-09T08:55:26Z
lastModifiedDate
2026-06-09

ARTIFACTORY: How to resolve the Azure DevOps Pipeline error: "##[error]Error: Failed rmRF: fs.rmSync is not a function" when using "JFrog Extension"

Introduction 

JFrog Platform supports integrating Azure DevOps pipelines with the JFrog Extension. If you are using a Self-Hosted (on-premise) Azure DevOps Server and using the "JFrog Extension" in your pipelines, you may suddenly encounter the error sometimes:
"##[error]Error: Failed rmRF: fs.rmSync is not a function". 
This error may occur unexpectedly, even if the pipeline has been running successfully before.


Root Cause

This error occurs when the JFrog Extension version is incompatible with the Azure DevOps Agent.

For on-premise Azure DevOps, you can control whether the Azure DevOps Agents are updated. However, extensions in the Azure DevOps Marketplace (such as the JFrog Extension) will update automatically by default.

For example, the JFrog Extension is automatically updated from 2.12.3 to 2.12.4:

User-added image 

If your current Azure DevOps Agent version is 3.225.2 (or older), the mismatch will trigger the error:
/azp/agent/_work/_tool/jf/2.85.0/x64/jf c remove "example-build-name" --quiet
Executing JFrog CLI Command:
/azp/agent/_work/_tool/jf/2.85.0/x64/jf c remove "example-build-name" --quiet
##[error]Error: Failed rmRF: fs.rmSync is not a function
Collecting environment variables...
Executing JFrog CLI Command:
/azp/agent/_work/_tool/jf/2.85.0/x64/jf rt bce "example-build-name" "v1"
Solution 

Upgrade your Azure DevOps Agent to version 3.238.0 or higher. Once the agent is updated, re-run the pipeline, and the issue will be resolved.