Why does code not work anymore? Did something change in users backend?

The following code worked when I originally put it into data.js in the backend:

import wixUsers from 'wix-users-backend';

export function Projects_beforeInsert(item, context) {
    item.posterReference = wixUsers.currentUser.id;
 return item;
}

The references are now broken, though. Did something change? Am I missing something?