Using onMembersCreated and onMembersUpdated

I’ve been trying to code something to copy the members when they been created or updated , but always get error , could help me please ? I’m new in javascript and I tried the same function in api and get error https://www.wix.com/velo/reference/wix-members-backend/events/onmembercreated
I tried to get imports but not working. The fuction works perfectly woth object intern but not with external object
This is my code :

import wixData from 'wix-data';
import wixMembersBackend from 'wix-members-backend';
import wixMembers from 'wix-members';
import { authentication, authorization, badges, currentMember, members, Events } from 'wix-members-backend';

export function wixMembers_onMemberCreated(event) {

  debugger;

    const userId = event.entity._id;       
   let creationEventId = event.metadata.id;
   let name = event.entity.profile.nickname;
   let loginEmail = event.entity.loginEmail;
   let phone = event.entity.contactDetails.phones;
   console.log(userId);
   console.log(creationEventId);
   console.log(name);
   console.log(phone);
  let toSave = {
    "_id":   userId,
  "name":name,
  "email":loginEmail};
console.log(toSave);
debugger;
wixData.save("testes_rapha/Contacts", toSave)
  .then( (results) => {
    let item = results; //see item below
  } )
  .catch( (err) => {
    let errorMsg = err;
  } )}

export function wixMembers_onMemberUpdated(event) {
  debugger;
   const userId = event.entity._id;       
   let creationEventId = event.metadata.id;
   let name = event.entity.profile.nickname;
   let loginEmail = event.entity.loginEmail;
   let phone = event.entity.contactDetails.phones;
   console.log(userId);
   console.log(creationEventId);
   console.log(name);
   console.log(phone);
  let toSave = {
    "_id":   userId,
  "name":name,
  "email":loginEmail};
console.log(toSave);
debugger;
wixData.save("testes_rapha/Contacts", toSave)
  .then( (results) => {
    let item = results; //see item below
  } )
  .catch( (err) => {
    let errorMsg = err;
  } )}

I can’t get onMemberCreated to fire at all. My code is in event.js as instructed in the documentation. I copied the sample code from the documentation and added console.log calls. Nothing ever shows in the logs displayed from dashboard Developer Tools>Site Logs
My code is below. What am I missing? The member is, in fact, created and shows up in the Contacts and Members lists in the dashboard.

export function onMemberCreated ( event ) {
console . log ( “in member created event handler in backend” );
console . log ( event );
}

I have also tried

export function wixMembers_onMemberCreated ( event ) {
console . log ( “in member created event handler in backend” );
console . log ( event );
}

Hello, onMemberCreated() must be used in events.js as this is a special reserved file. However, there are others reporting issues with this API right now so if you have the code in the correct place per the documentation and believe you are experiencing a bug, please see this post on how to report bugs