title: Getting 'cy.session is not a function' error in Cypress runner
body: <p>I'm trying to follow <a href="https://www.cypress.io/blog/2021/08/04/authenticate-faster-in-tests-cy-session-command/" rel="nofollow noreferrer">this</a> article here to add cy.session() to my login function. However when I do this and then run my test, I get the error <code>cy.session is not a function</code></p>
  <p>I've set <code>&quot;experimentalSessionSupport&quot;: true</code> in my cypress.json config file (and confirmed that my test is seeing this value as true too). From my understanding, that should be all I need to do, but obviously I'm missing something.</p>
  <p>I'm using Cypress version 9.4.1. I've tried creating a custom login command instead (exactly as in the article) but just get the same error when running it.</p>
  <p>My test works perfectly without the <code>cy.session()</code> command.</p>
  <p><strong>login.js</strong>:</p>
  <pre><code>class LoginPage {    
  
    ...
  
    login(username, password) {
       cy.session([username, password], () =&gt; {
        cy.visit('/login');
        this.emailField.type(username);
        this.passwordField.type(password);
        this.loginButton.click();
       });
    }
  
  }
  
  export default new LoginPage();
  </code></pre>
  <p><strong>cypress.json</strong>:</p>
  <pre><code>{
      ...
      &quot;experimentalSessionSupport&quot;: true
  }
  </code></pre>