# How to fix QBCore “No such export” errors

**“No such export X in resource Y” means the caller cannot find export `X` on provider `Y` in its current runtime.** Check the provider's first startup error, exact resource name, client/server side and installed API revision. Adding arbitrary waits or renaming an inventory will not implement a missing export.

This reference is source-reviewed, not tested against every fork. Record the complete error with caller file/line and the core, provider and caller commits. Redact credentials and player data before sharing logs.

## Match the error to the next check

| Error pattern | First checks | Continue with |
| --- | --- | --- |
| `No such export GetCoreObject in resource qb-core` | Is the folder really `qb-core`, did it start without earlier Lua errors, and is the caller using the QBCore API? | [Core setup](/docs/resources/qb-core) and [load order](/docs/troubleshooting/resource-load-order) |
| `No such export LoadInventory in resource qb-inventory` | Is the installed inventory the provider the core expects? Does its server code export this exact function? | [Inventory diagnostics](/docs/troubleshooting/inventory-updates) |
| Missing `AddItem`, `RemoveItem` or `OpenInventory` | Exact export name, provider and runtime; check caller arguments only after resolving the missing export | [Inventory APIs](/docs/resources/qb-inventory) |
| Missing `AddBoxZone` or `addBoxZone` | `qb-target` and `ox_target` use different, case-sensitive APIs; registration runs on the client | [ox_target migration](/docs/guides/ox-target-qbcore) |
| Export disappears after a restart | Did the provider initialize successfully, and does the caller reinitialize in the supported sequence? | [Update conflicts](/docs/troubleshooting/resource-update-conflicts) |

The provider in the actual error matters. A missing `LoadInventory` in a different resource is not automatically the same issue as the `qb-inventory` case.

## 1. Find the provider's first failure

Read the server console from a clean staging startup. A syntax error in shared items, a missing dependency or failed initialization may occur before the export message. Repair that first error before changing the caller.

Check the active txAdmin profile's resource directory, not another copy on disk. Preserve the exact folder name and `fxmanifest.lua`; ZIP suffixes and nested folders can change or hide the resource. See [resource load order](/docs/troubleshooting/resource-load-order).

## 2. Check client versus server

For the reviewed QBCore revision, obtain the core object in the runtime where you need it:

```lua
local QBCore = exports['qb-core']:GetCoreObject()
```

This supported core call does not mean every resource exports every function on both sides. Search the provider's manifest and Lua code for the exact export registration, then verify which scripts load it. Lua export names are case-sensitive. A client-only target API cannot be called from a server script.

For source-based installations, inspect each resource separately:

```bash
git rev-parse HEAD
git status --short
rg -n 'GetCoreObject|LoadInventory|OpenInventory|exports' fxmanifest.lua client server
```

Adjust paths to the installed layout. No match in these folders is a clue, not proof of absence: exports can also be registered by other manifest-loaded files. For ZIP installations, retain the release/source URL and archive checksum instead of claiming a Git revision.

## 3. Compare the caller's expected contract

If the provider starts but the installed source never registers the export on the calling side, this is an API mismatch. Compare the caller's documented dependencies with the provider version. Restore a known matching combination or migrate the caller to the provider's documented API.

Do not create an empty `LoadInventory` stub just to suppress an error: loading and saving items has persistence consequences. Do not replace a missing export with a client-triggerable server event without validating permissions and data. [ox_inventory requires its own bridge and caller review](/docs/guides/ox-inventory-qbcore).

## 4. Fix startup dependencies without hiding failures

When a resource genuinely depends on QBCore, declare that dependency in its existing manifest and start it after the core:

```lua
-- Add to the caller's fxmanifest.lua, preserving its other entries.
dependency 'qb-core'
```

This establishes a dependency; it does not fix invalid Lua, an absent export or incompatible versions. Keep the [resource order](/docs/troubleshooting/resource-load-order) consistent with all other dependencies. Coordinate restarts on staging; restarting core under connected players is not a diagnostic shortcut.

## Acceptance and rollback

Repeat a clean startup and the exact action that triggered the error. Verify successful initialization, the expected result, rejected requests and reconnect/persistence where inventory is involved. A quiet console alone is insufficient. Restore the previous matching code/configuration and database snapshot if a migration changed storage; keep legitimate post-deployment writes in your rollback plan.

## Sources

- [Core client exports at 9b3cddcc](https://github.com/qbcore-framework/qb-core/blob/9b3cddcce93e5e12cbcf6b47b866b687d32ac7bf/client/main.lua) and [server exports](https://github.com/qbcore-framework/qb-core/blob/9b3cddcce93e5e12cbcf6b47b866b687d32ac7bf/server/main.lua).
- [Cfx.re resource manifest reference](https://docs.fivem.net/docs/scripting-reference/resource-manifest/resource-manifest/): dependencies and runtime script declarations.
- [Inventory baseline API](https://github.com/qbcore-fivem/qb-inventory/blob/dc3d07fc60139de569df38c5ac178ed4cada4577/server/functions.lua), pinned historical baseline; inspect your own provider revision before changing callers.
