ReferenceError: $ is not defined (Selenium::WebDriver::Error::JavascriptError)

I am playing around writing an automation script for using selenium webdriver and running the tests with jest

I have the create account button defined as,

 get createAccountBtn() {
    return $("#SubmitCreate");

and it is used here,

 createAcctBtnIsVisible() {

In my test I used this to assert that the button is visible, like so:

test("it loads the create account button", async () => {

It passes.

I also have a function using this selector to then click on the create accountbutton and have it defined like this,

 submitNewEmail() {

In my test this is the assertion it is performing

test("it does not allow the user to continue without entering a valid email address", async () => {
    expect(errorMsg).toBe("Invalid email address.");

However, when I run it, I get an error that $ is not defined

ReferenceError: $ is not defined
       9 | 
      10 |   get createAccountBtn() {
    > 11 |     return $("#SubmitCreate");
         |     ^
      12 |   }

I am not sure why this is happening. Thank you for helping.

Source: Ask Javascript Questions