Error: $db is not defined

Hi Community,

I am having issues with $db object on the server.js file in a SMI app.

when i’m executing a method from the server.js file i’m getting this console error:

this how i invoke the method:

client.request.invoke('methodName')

and this is the error:

and that’s all printed in console

this are the nod and fdk versions i’m using

Screen Shot 2022-07-04 at 14.04.13

Thanks.

Hello @Moises

Can you share the server.js code snippet with me, so that I can check how the $db method is used?

It would be helpful if you can share the zip file in DM as well

@Moises,
Good Day! Welcome to the community,
Are you trying to call $db via SMI in Iparams or App rendering?
If you are trying in Iparams it won’t work as we did not support DB on the Iparams page.

Hope it helps

Thanks

sorry Shravan, I’m not allowed to share the source code

Hi Santhosh, I’m trying to call $db on full page app and sidebar sections.

@Moises,
Good Day!
Can you please share with us the sample app with the issue reproducible?
so that we can try our best to find an effective solution.

Thanks

This is weird.

@Moises — Were you able to find a fix for it? Or are still able to reproduce the issue?

Hi, i still having this issue

I sent you a private message to further discuss any details that you don’t want to share publicly. Let’s continue our discussion further.