Suddenly cannot import Back End Modules after Years of being able to

Suddenly I cannot import Back End Modules after Years of being able to ?!

I suspect a problem on Wix side not my code as I have not changed the code for years and it was worked ok until now

eg.

import { mediaManager } from 'wix-media-backend';

also

import wixStoresBackend from 'wix-stores-backend';
import wixData from 'wix-data';
import { members } from 'wix-members-backend';
import { currentMember } from 'wix-members-backend';
import { wixUsers } from 'wix-users-backend';

I did a very minor republish a few days ago to change a date in the text on a page but still the code was unchanged.

I see this thread also highlighted the problem over a year ago which magically went away but I need this fixing by Wix today please

wix server bug

Please help as it has stopped my whole site working

Are you able to share a little more information?

  • Where are you adding these imports? Backend (.jsw/.web.js)/Frontend (page code/public .js file)
  • Are there any specific error messages?
  • Is this in the in-editor IDE, of the Wix IDE (VSCode based)

Thank you for your help.

The code is in a .jsw file in the backend section and is used in a simple form page on my website.

I am using the wix editor.

I get a build log error when publishing

[/pages/Submit Urls****.ezq5w.js]: Cannot find module ‘wix-media-backend’ in ‘public/pages/ezq5w.js’

As I say this code has worked for years and there have been zero changes to it so I belive there is a bug on Wix servers…

The error in the build log is indicating that the code is written in a site page, rather than in a .jsw file.

You’ll probably find if you navigate to the page and view the code, it’ll have errors on the import

I have now managed to fix this. Thank you for your help

I have now managed to fix this. Thank you for your help

1 Like

I was about to respond, but I’m glad to hear the issue has been resolved. :innocent:
Personally, I had a feeling that there was a slight mistake in the way the backend module was being imported. So, what was the cause in the end? :upside_down_face: