#  Velo ModuleLoadError: Cannot find module 'wix-ecom-backend/v1' despite Wix Stores being installed

**URL:** <https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967>\
**Category:** Ask the community\
**Tags:** wix-stores-backend, wix-ecom-backend, question, code, wix-studio\
**Created:** [August 21, 2025, 11:07pm UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967 "2025-08-21T23:07:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elif\_Altun](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/elif_altun/32/96772_2.png) [@Elif\_Altun](https://forum.wixstudio.com/u/Elif_Altun)\
**Post date:** [August 21, 2025, 11:07pm UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967/1 "2025-08-21T23:07:07Z")

</div>

Hello everyone,

I’m trying to create a dynamic product in my Wix Store and add it to the cart using Velo backend code. I’ve followed the official documentation, but I’m consistently running into a `ModuleLoadError`.

My site has the **Wix Stores** app installed and published.

Here is the backend code (`backend/pay-service.jsw`) that is causing the issue:

JavaScript

```javascript
import wixStores from 'wix-stores-backend';
import { cart } from 'wix-ecom-backend/v1';

export async function addDynamicItemToCart(lessonId, languageId, teacherId, selectedSlotValues, numberOfWeeks) {
    // ... logic to prepare product data ...
    const newProduct = {
        // ... product properties ...
    };

    try {
        const createdProduct = await wixStores.createProduct(newProduct);
        const itemToAdd = {
            productId: createdProduct._id,
            quantity: 1,
        };

        const addedItem = await cart.addProducts([itemToAdd]);
        return { success: true, cartId: addedItem.id };
    } catch (error) {
        return { success: false, error: error.message };
    }
}

```

When I run this code, I get the following detailed error log:

```javascript
ModuleLoadError: Error loading web module backend/pay-service.jsw: Both resolutions failed at _load!
...
Original resolver: Cannot find module 'wix-ecom-backend/v1'
...
YarnPNP: Your application tried to access wix-ecom-backend, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.

```

**Troubleshooting Steps I’ve Already Taken:**

- Confirmed that the **Wix Stores** app is installed and active on my site.

- The import statement `import { cart } from 'wix-ecom-backend/v1';` is exactly as specified in the Wix Velo documentation.

- I have saved and published the site multiple times.

- I have checked for any missing npm packages, but `wix-ecom-backend` is a built-in module, not a separate package.

The error message `Your application tried to access wix-ecom-backend, but it isn't declared in your dependencies` suggests a server-side issue where the module is not being correctly provisioned for my project, despite the required app being installed.

Has anyone else encountered this specific `YarnPNP` error with `wix-ecom-backend/v1`? Any guidance on how to resolve this platform-level issue would be greatly appreciated.

Thank you!

---

<div class="post-metadata">

**Author:** ![onemoretime](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/onemoretime/32/104023_2.png) [@onemoretime](https://forum.wixstudio.com/u/onemoretime)\
**Post date:** [August 22, 2025, 12:58am UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967/3 "2025-08-22T00:58:36Z")

</div>

Hi, @Elif_Altun !!

Wouldn’t it work if you rewrote it like this? 🙌

```javascript
import { cart } from 'wix-ecom-backend/v1';

```

to

```javascript
import { cart } from "wix-ecom-backend";

```

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [August 22, 2025, 10:07am UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967/4 "2025-08-22T10:07:35Z")

</div>

> [@Elif\_Altun](#):
>
> The import statement `import { cart } from 'wix-ecom-backend/v1';` is exactly as specified in the Wix Velo documentation.

Can you share the documentation where it’s referenced like this? As far as I can tell it should be `import { cart } from "wix-ecom-backend";` As shown [here](https://dev.wix.com/docs/velo/apis/wix-ecom-backend/cart/introduction), and mentioned by @onemoretime

---

<div class="post-metadata">

**Author:** ![Elif\_Altun](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/elif_altun/32/96772_2.png) [@Elif\_Altun](https://forum.wixstudio.com/u/Elif_Altun)\
**Post date:** [August 22, 2025, 11:33am UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967/5 "2025-08-22T11:33:08Z")

</div>

Hi, I still get the error even though I made that adjustment. I’m integrating a **“Bireysel Ders Satın Alma” (Individual Lesson Purchase)** page on my Wix site. The page loads correctly, displays languages, lessons, and teachers via repeaters, and allows the user to select available time slots.

**Problem:**

- Teacher names are not displayed in the repeater (showing “No Name”).

- When I click the payment button, I get the following console error:

```javascript
TypeError: (0 , pay_service.createCheckoutAndOrder) is not a function

```

**Setup:**

- Backend: `pay-service.jsw` in Wix Velo backend

- Frontend: Repeaters and checkbox groups to select lesson, teacher, and time slots

- Payment: Using `wix-pay` and `wix-ecom-backend`

**Backend function:**

```javascript
// pay-service.jsw
import wixData from 'wix-data';
import wixStores from 'wix-stores-backend';
import { checkout } from 'wix-ecom-backend';

export async function createCheckoutAndOrder(lessonData) {
    // logic to create product, checkout, and order
}

```

**Frontend import:**

```javascript
import { createCheckoutAndOrder } from 'backend/pay-service';

```

**What I observe:**

- Console logs confirm that lesson, language, and teacher data are correctly fetched.

- The `lessonData` object passed to the backend is:

```javascript
{
  "lessonId": "f2101197-f1c3-4b9b-9daf-defd4f2cb6e4",
  "languageId": "e2333bfa-ed18-40d8-a841-7ada3bf779d6",
  "teacherId": "f918c22c-69f2-426c-adeb-3b0bf6943353",
  "selectedSlotValues": ["Monday-09:00-10:00", "Tuesday-11:00-12:00"],
  "numberOfWeeks": 10
}

```

**Expected behavior:**

- Teacher names displayed correctly in repeater.

- Payment flow starts successfully and redirects the user to Wix Pay checkout.

**Question:**  
Has anyone encountered the `(0 , pay_service.createCheckoutAndOrder) is not a function` error when calling a `.jsw` backend function from frontend in Wix Velo? How can I fix this so the frontend recognizes the function?

Thanks in advance for any guidance!

---

<div class="post-metadata">

**Author:** ![Elif\_Altun](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/elif_altun/32/96772_2.png) [@Elif\_Altun](https://forum.wixstudio.com/u/Elif_Altun)\
**Post date:** [August 22, 2025, 11:34am UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967/6 "2025-08-22T11:34:50Z")

</div>

When I get support from artificial intelligence, they always end up finding the fault on Wix’s side.

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [August 22, 2025, 11:39am UTC](https://forum.wixstudio.com/t/velo-moduleloaderror-cannot-find-module-wix-ecom-backend-v1-despite-wix-stores-being-installed/72967/7 "2025-08-22T11:39:53Z")

</div>

Generally speaking, I would encourage to use .web.js (Web Methods) - [Velo Wix Web Module Introduction | Velo](https://dev.wix.com/docs/velo/apis/wix-web-module/introduction) - rather than .jsw, as these are deprecated.

I’m a little confused on the intended flow - since `wix-pay` is generally used with `wix-pay-backend` to create payments - [Start Payment | Velo](https://dev.wix.com/docs/velo/apis/wix-pay-frontend/start-payment)

And as far as I remember, when importing from the backend, you need to include the file type. So:

- This `import { createCheckoutAndOrder } from 'backend/pay-service';`
- Would be `import { createCheckoutAndOrder } from 'backend/pay-service.jsw';`
