Jenkins "No such DSL method" - Fix Unknown Pipeline Steps
Jenkins compiled the Jenkinsfile but, at runtime, could not find a pipeline step (DSL method) you called. Either the step name is wrong, the plugin that provides it is not installed, or you called it where it is not allowed.
What this error means
A stage fails with No such DSL method '<name>' found among steps [...], listing the steps Jenkins does know about. The build compiled fine; it only fails when execution reaches the unknown step.
java.lang.NoSuchMethodError: No such DSL method 'slackSend' found among steps
[archiveArtifacts, build, catchError, checkout, echo, sh, stage, ...]Common causes
The plugin providing the step is not installed
Pipeline steps come from plugins. slackSend needs the Slack Notification plugin, withAWS needs the AWS Steps plugin. Without the plugin, the step simply does not exist.
Misspelled or wrong-case step name
DSL method names are case-sensitive - archiveArtifacts, not archiveartifacts. A typo makes Jenkins look for a step that is not registered.
A directive used as a step
Declarative directives like environment or options are not callable steps inside script {}. Calling them as methods raises "No such DSL method".
How to fix it
Install the plugin that provides the step
- Find which plugin exposes the step (the step is documented under its plugin on plugins.jenkins.io).
- Install it via Manage Jenkins → Plugins, then restart if required.
- Pin the plugin in your controller config-as-code/plugins.txt so it is present on every controller.
Check the exact step name and snippet
Use the in-product Snippet Generator (Pipeline Syntax) to produce the exact, correctly-cased call for an installed step.
// example of the correct, plugin-provided call
slackSend channel: '#ci', message: "Build ${env.BUILD_NUMBER} finished"How to prevent it
- Manage plugins as code (plugins.txt / JCasC) so required steps are always installed.
- Generate step calls with the Snippet Generator instead of hand-writing them.
- Run the pipeline linter, which catches some unknown-step usage before merge.