Why isn't my backend code working when called from the frontend?

I’m having trouble with calling backend functions from the frontend.

I’ve continued using the deprecated functions but I now need to use some of the new functionality.
I’ve created a new web module, created a function to elevate members.updateMember and tested my code successfully via Wix Editor. However, if I preview the site to call the function from the front end then no errors are generated but the member information isn’t updated

Here’s the frontend code

import { elevatedUpdateMember} from 'backend/memberFunctions.web.js'

$w.onReady(async function () {
    console.log(elevatedUpdateMember);
    let contactid = '...' // it is a valid memberid guid
    let changes = {
		"member": {
			"contact": {
				"firstName": "Douglas",
				"customFields": {
					"custom.membershipno": {
						"value":"1"
					}
				}
			}
		}
	}
	elevatedUpdateMember(contactId, changes)
	.then((result) => {
		console.log(`Got the final result:`, result);
		return(result);
	})
	.catch((error) => {
		console.log(error)
	})

And the backend

import { authentication, badges, members } from "wix-members.v2";
import { Permissions, webMethod } from "wix-web-module";
import { elevate } from 'wix-auth';

export const elevatedUpdateMember = webMethod(
    Permissions.Anyone,
    async (id, changes) => {
        console.log(`into memberFunctionsV2:elevatedUpdateMembee`, id, changes);
        try {
            const elevatedUpdateMember = elevate(members.updateMember);
            let member = await elevatedUpdateMember(id, changes);
            console.log("Updated member:", member);
            return member;
        } catch (error) {
            console.error(error);
            // Handle error
        }
    },
);

Can anyone see anything obviously wrong?

Many Thanks

Doug

When you say there are no errors, where are you checking for this? In the browser console?

I’d recommend watching the Wix Logs from your site dashboard to see if you’re getting any additional info there - View Logs using Wix Logs | Velo