Sync Member registration form with Contacts?

I changed my code to the following, and now it does not even register users as members. The data is submitted to the database, but users are no longer registered as a member.

import wixUsers from 'wix-users';
import wixWindow from 'wix-window';
import wixLocation from 'wix-location';

$w.onReady(function () {
$w("#submitButton").onClick(() => {

let email = $w("#email1").value;
let password = $w("#password").value;
let firstName = $w("#firstname").value;
let lastName = $w("#lastname").value;
let position = $w("#position").value;
let phone = $w("#phone").value;
let howTheyHeard = $w("#dropdown1").value;
let organization = $w("#organization").value;
let address = $w("#address").value;
let gradeLevel = $w("#gradeLevel").value;
let comments = $w("#moreinfo").value;

wixUsers.register(email, password, {
contactInfo: {
"firstName": $w('#firstname').value,
"lastName": $w('#lastname').value,
"email": $w("#email1").value,
"position": $w("#position").value,
"phone": $w("#phone").value,
"how they heard": $w("#dropdown1").value,
"organization": $w("#organization").value,
"address": $w("#address").value,
"grade level": $w("#gradeLevel").value,
"comments": comments
}
})
.then((result) => {
let resultStatus = result.status;
wixWindow.lightbox.close();
wixLocation.to("/member/me");
});
});
});

It does register as members when I add the following code to the bottom, but the contact info still does not go anywhere.

$w.onReady(function () {
$w('#submitButton').onClick(function () {
let email = $w('#email1').value;
let password = $w('#password').value;
wixUsers.register(email, password)
})
})