Cannot find module 'wix-users-backend'

Hi Folks!

I wanted to try some stuff with the wix-users-backend >updateUserFields() function for my site.

To use that, there’s this import to do:

import wixUsersBackend from 'wix-users-backend';

aaaaaaand that’s already enough to run in trouble haha: When previewing the page (or the published site), I get this error:

Cannot find module 'wix-users-backend'in 'public/pages/if0lo.js'

Don’t really think I did something wrong so far, or did I already? :stuck_out_tongue:

So, what’s the deal with that?

Thanks for your wise input.

Cheerios

Never mind, I’m totally new to the backend world: this can only be imported in a backend page. DUUUuuuuuhhhh :sweat_smile:

Works now!

Hi~

I have same problem as you, how do you update the user info at the client-side(frontend)?

@ace940173583 The updateUserFields( ) function is part of the wix-users-backend module API only, not the wix-users module. So not possible in the frontend is my guess.

And as I discovered you can only import the wix-users-backend module on a page in your backend, there’s that.

Frankly, it makes sense that you don’t want the client side to be able to update these kind of data in the frontend. Security reason I suppose.