Skip to content
Latchkey

Jenkins "No such DSL method found among steps" Pipeline Error

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]

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

  1. Search Manage Jenkins > Plugins for the step name.
  2. Install the plugin and restart if prompted, then re-run.

Check spelling and pipeline-steps reference

  1. Compare the step name against the Pipeline Steps Reference for exact casing.
  2. 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.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →