Backend Module Function Returns Undefined in Wix Velo - ping() is not a function

Hi, @user5418 !!

To call backend code from the frontend, you need to use imports from files defined with either .jsw or .web.js. In your case, the issue arises because your function is defined using the .jsw approach, but it is being called as if it were a .web.js function. Standardizing the function definition to the .web.js approach should likely resolve the problem. I’ve included a reference link—try making the necessary adjustments. :raised_hands: :smiling_face_with_halo:

like this

import { Permissions, webMethod } from "wix-web-module";

export const ping = webMethod(Permissions.Anyone, () => {
  return "pong";
});

// another functions ...