title: WorkflowScript: 1: unable to resolve class groovy.yaml.YamlSlurper
body: <p>I am use the Jenkins docker container to run Jenkins.  I have this pipeline:</p>
  <pre><code>import groovy.yaml.YamlSlurper
  
  def wholeFileData
  def ys = new YamlSlurper()
  
  pipeline {
      agent any
      stages {
      ...
  </code></pre>
  <p>... and I get this error:</p>
  <pre><code>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  WorkflowScript: 1: unable to resolve class groovy.yaml.YamlSlurper
   @ line 1, column 1.
     import groovy.yaml.YamlSlurper
     ^
  </code></pre>
  <p>How can I fix this?</p>