No acces to backend js file - wix editor dev mode

Overview: makeDOTcom grab cms data from wix and a http request send update date to the wix cms back

I’m having trouble with
the http request from makeDOTcom dont gets acces to my js file in the backend of wix. I also tryed to do a simple ping request to one js file and i always gets the same error.

Working in
Wix Editor, Dev Mode, CMS

Site link
www.schindlerei-fitness.at

you can register as user and find in usermenu “workoutBuilder”. User can fill out the formular - send data to cms - webhook grabs the data - send to chatgpt - http request should send data back to cms and update cms user row.

What I’m trying to do
I try to import the data from external service to wix CMS

What I’ve tried so far
I createt backend files:

  • http-functions (folder)
    *updateWorkout.js

code "updateWorkout.js

// backend/http-functions.js
import wixData from 'wix-data';
import { ok, badRequest, serverError } from 'wix-http-functions';

/**
 * POST  /_functions/updateWorkout      (live)
 * POST  /_functions-dev/updateWorkout  (Editor-Preview)
 */
export async function post_updateWorkout(request) {
  // Body einlesen
  let body;
  try {
    body = await request.body.json();
  } catch {
    return badRequest({
      body: { success: false, error: "Body ist kein gültiges JSON" }
    });
  }

  const { itemId, updates } = body || {};

  if (!itemId || typeof updates !== "object") {
    return badRequest({
      body: { success: false, error: "itemId und updates sind Pflichtfelder" }
    });
  }

  // Update durchführen
  try {
    const updatedItem = await wixData.update("workoutdaten", {
      _id: itemId,
      ...updates
    });

    return ok({
      body: { success: true, item: updatedItem }
    });

  } catch (err) {
    return serverError({
      body: { success: false, error: err.message }
    });
  }
}

  • http-functions.js (empty)

I did a test and tryed to open the updateWorkout.js file with that URL:

Blockquote

Wix LOG File:
Error loading function from web module backend/http-functions.js: function ‘use_updateWorkout’ not found

{
  "insertId": "..........654wmF60K2wctw9GGYsaua",
  "timestamp": "2025-07-15T16:50:07.764Z",
  "labels": {
    "siteUrl": "https://schindlerei-fitness.at/",
    "revision": "561",
    "namespace": "Velo",
    "tenantId": "cc5bb357-0399-4396-aedb-cdac82c12c11",
    "viewMode": "Site"
  },
  "operation": {
    "id": "1752598207.44428828695173771884",
    "producer": "backend"
  },
  "jsonPayload": {
    "message": "Error loading function from web module backend/http-functions.js: function '**use_**updateWorkout' not found"
  },
  "severity": "ERROR",
  "receiveTimestamp": "2025-07-15T16:50:07.939Z",
  "id": "ee9695b8-e2df-426d-932c-441ba0980075"
}

Extra context
It dosent matter what file i try to reach in my backend. wix always try to open _use(filename).

please can someone help me out and sorry for my bad english.

thanks for your help. I would also pay you for your time and service.

Best regards Berni

Hi, @Bernhard_Schindler !!

I’m not sure if my understanding is correct, but it seems simpler to get the result directly by calling the ChatGPT API from the Wix backend. Is there any particular advantage to going through “Make.com“ instead? :slightly_smiling_face:

All i know is, to get acces to wix database from external service you need a fetch in wix backend. Otherwise the acces is not blocked by wix.

And this backend fetch is not working and i habe no idea why wix is always asking for “use_(filename)”.

I also tryed to change the filename to the asked one. No change.

OK. I still believe that installing the OpenAI npm package and using it directly in Wix might be simpler. That said, when I read your question, one thing caught my attention — you mentioned a “folder” called http-functions. That made me wonder… did you perhaps create a file named http-functions.js yourself? :thinking:

In Wix, http-functions.js is a special file that is automatically generated when you enable public API routes for your site. Because of that, it’s possible that you created a file called http-functions.js manually and wrote your public API function in there. If that’s the case, Wix might not be able to properly detect or load your function — which could explain the error saying that the function could not be found at runtime. :innocent:

So, that’s one possible explanation for the issue you’re encountering.