import wixUsers from 'wix-users';
$w.onReady(() =>{
let user = wixUsers.currentUser;
let email = user.getEmail()
.then((email) => {
let userEmail = email;
});
Or like this:
import wixUsers from 'wix-users';
let user = wixUsers.currentUser;
console.log(user);
var email;
$w.onReady(async function () {
email = await user.getEmail();
});