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
- 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.
Related guides
Jenkins "WorkflowScript: unexpected token" Jenkinsfile Parse ErrorFix the Jenkins "WorkflowScript: N: unexpected token" Groovy parse error that fails a Jenkinsfile before any…
Jenkins "java.lang.NoSuchMethodError" in a Pipeline BuildFix the Jenkins java.lang.NoSuchMethodError thrown at runtime in a pipeline, usually from a plugin or core ve…
Jenkins "Scripts not permitted to use method" Sandbox ErrorFix the Jenkins "Scripts not permitted to use method" sandbox rejection by approving the signature or moving…