Build.log showing error when publishing

I’m having trouble with
When I try to publish my site I’m getting an error reported in the build.log

build.log

------------------------------------------------------
deploymentId: 11afe5a6-bf3e-41d6-a7f5-aa11b5f05855
14/01/2026, 12:37:25
Status: Error
------------------------------------------------------
[masterPage.js]: Cannot find module 'wix-auth' in 'public/pages/masterPage.js'

masterPage.js

import wixData from 'wix-data';
import { elevate } from 'wix-auth';
import { contacts } from 'wix-crm.v2';
import { badges } from 'wix-members.v2';
import { secrets } from 'wix-secrets-backend.v2';

It seems to be running ok in Preview, at least I can’t see anything going wrong.

It WAS working the last time I published a couple of weeks ago. Is it something I’m doing? or are dark forces at work :slight_smile:

Working in
Wix Editor

Many thanks

Doug

Nothing seems immediately wrong with the way the imports are written. Can you share more of the code?

Is it still happening after refreshing the editor?