Code not working in lightbox

Hi, thanks for taking a look for me.

The lightbox now opens fine but nothing is happening when I enter an email into the input field (one that I know exists in the dataset) There are no messages in the developer console.

My code now looks like this…

import wixData from 'wix-data';
import wixLocation from 'wix-location';
import { session } from 'wix-storage';

export function btnLogin_click(event, $w) {

 let searchValue = $w('#inputEmailAddress').value;

    wixData.query("MembersOnly")
        .eq('email', searchValue)
        .eq('approved', true)
        .find()
        .then((results) => {

 let members = results.items;

 if (results.length > 0) {

 let member = members[0];
 let emailAddress = member.email;
 let sessionId = member._id

                console.log(emailAddress, sessionId);
                session.setItem("activeSession", sessionId);
                wixLocation.to("/isw");

            } else {
                console.log("Email address does not exist");
                $w('#textErrorMsg').show()
            }

        })
            .catch((err) => {
            let errorMsg = err;
            console.log(errorMsg);
        });

}

When I run the same code in a normal page I get the correct messages in the developer console


or


All I see in the developer console when I enter an email address in the lightbox is…


?? Thanks