Jenkins "No such DSL method found among steps" Pipeline Error
By Daniel Zoghalchali·Latchkey
The Jenkinsfile compiled, but at runtime Jenkins could not find a pipeline step (DSL method) you called.
What this error means
A stage fails with "No such DSL method X found among steps [...]", listing the steps Jenkins does know. It compiled fine and only fails when execution reaches the unknown step.
jenkins
java.lang.NoSuchMethodError: No such DSL method 'slackSend' found among steps
[archiveArtifacts, build, catchError, checkout, echo, sh, stage, withCredentials]
Diagnose it: agent, workspace, or sandbox?
Declarative pipeline failures usually come from the environment rather than the script: no matching agent, a dirty reused workspace, or the Groovy sandbox rejecting a method.
Jenkinsfile
// print what the agent actually is
sh 'hostname && whoami && pwd && java -version'
sh 'env | sort | head -40'
// workspaces are REUSED between builds by default
cleanWs()
Common causes
The plugin providing the step is not installed
Steps come from plugins. slackSend needs the Slack Notification plugin; without it the step does not exist.
Misspelled or wrong-case step name
DSL method names are case-sensitive: archiveArtifacts, not archiveartifacts.
A directive used as a step
Declarative directives such as environment are not steps and cannot be invoked from a script block.
How to fix it
Install the plugin that provides the step
Search Manage Jenkins > Plugins for the step name.
Install the plugin and restart if prompted, then re-run.
Check spelling and pipeline-steps reference
Compare the step name against the Pipeline Steps Reference for exact casing.
Confirm the step is valid inside the block where you call it.
Jenkinsfile
// correct casing and a real step
steps { archiveArtifacts artifacts: 'build/**', fingerprint: true }
How to prevent it
Pin plugin versions and verify required plugins exist on the controller before merging a Jenkinsfile that uses new steps.
Frequently asked questions
What causes Jenkins "No such DSL method found among steps" pipeline error?
There are 3 common causes: the plugin providing the step is not installed, misspelled or wrong-case step name, and a directive used as a step. Steps come from plugins.
How do I fix Jenkins "No such DSL method found among steps" pipeline error?
There are 2 fixes depending on which cause you have: install the plugin that provides the step and check spelling and pipeline-steps reference. Work through them in order, since the first is the most common.
What does Jenkins "No such DSL method found among steps" pipeline error actually mean?
A stage fails with "No such DSL method X found among steps [...]", listing the steps Jenkins does know.
How do I stop Jenkins "No such DSL method found among steps" pipeline error happening again?
Pin plugin versions and verify required plugins exist on the controller before merging a Jenkinsfile that uses new steps.