Adding one import causes a router page to timeout (500)

I have the below router that queries a data collection. It works, unless I add one additional import, in which case it returns a 500 timeout error.

import { ok, notFound } from "wix-router";
import wixData from 'wix-data';

// If I remove the below import, the page loads. With it, I get a 500 timeout error.
import wixUsers from "wix-users";

export async function myRouter_Router(request, response) {

return await wixData.query("myCollection")
    .eq("_id", request.path[0])
    .find()
    .then((queryResult) => {
        if (queryResult.length > 0) {
            return ok("myRouter-page", queryResult.items[0]);
        }
        return notFound();
    })   
}

The difference is literally just this line:

import wixUsers from "wix-users";

Without it, the page loads. With it, I get the 500 error. I’m stumped. Any help would be appreciated. Thanks.

Probably because Wix Users API is not supposed to be used within the Wix Router code setup. That should be used on your own page when you retrieve the router data.
https://support.wix.com/en/article/corvid-creating-a-router
https://support.wix.com/en/article/corvid-about-routers
https://www.wix.com/corvid/reference/wix-router.html

If you view the Stripe example linked below, you can have a good look at using a router with Wix Users.
https://www.wix.com/corvid/forum/community-discussion/example-stripe-payment-processing

Also, note the difference between wix-users and wix-users-backend :

The wix-users module contains functionality for working with your site’s users from client-side code.

The wix-users-backend module contains functionality for working with your site’s users from backend code.

Perfect! Thank you!

getRoles() worked on the router.js in the past…
It broke my site functionality.