How to fix "No such export" in FiveM
Actualizado el 23 nov 2026 · 3 min de lectura
En esta página
"No such export" means one resource tried to call a function from another resource that isn't running, or doesn't offer a function by that name. In most cases the fix is to start the resource that provides the export earlier in server.cfg.
You'll see it in the server console like this:
SCRIPT ERROR: @my-script/server/main.lua:12: No such export getPlayerData in resource my-framework
Read it from the right: my-framework is the resource that was supposed to provide the export, getPlayerData is the function name, and the file and line at the start show where the call was made. The resource named in the file path is the one calling, not the one that's broken.
Why it happens
- The providing resource isn't started yet. Exports only exist while their resource is running. If your script calls one while it is loading and the provider starts later in
server.cfg, the call fails. - The providing resource failed to start. An earlier error, such as a missing database or a bad entitlement, stops it, so the export never appears.
- The name is wrong. The resource folder name or the function name doesn't match, including capital letters: names are case sensitive on Linux servers.
- The version doesn't match. An older or newer copy of the provider may not have that export, which happens after updating one script but not the other.
Fix 1: start the provider first
Open server.cfg and put the providing resource above the resources that use it. Frameworks, libraries and the database layer go first, the scripts that rely on them after:
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure my-script
Then restart the server. The order shown is only an example: check the documentation of each script for what it needs.
Fix 2: declare the dependency
In the calling resource's fxmanifest.lua, list what it needs. The server then refuses to start the resource until the dependency is running, which turns a confusing runtime error into a clear one:
fx_version 'cerulean'
game 'gta5'
dependencies {
'ox_lib',
'oxmysql',
}
Fix 3: check the provider actually started
Scroll up in the console and read the first error, not the last. If the provider reports its own error, fix that and the "No such export" line usually disappears. You can check the state of a resource in the server console:
refresh
ensure my-framework
refresh rescans the resources folder for new or changed resources, and ensure starts the resource, or restarts it if it is already running.
Fix 4: check the names
- The resource name is its folder name. A folder in square brackets such as
[qb]is only a category, not part of the name. - The export name in the call has to match the one the provider defines. In Lua a call looks like this:
local data = exports['my-framework']:getPlayerData(source)
Open the provider's code and look for exports('getPlayerData', ...). If it isn't there, you are probably using a different version than the script expects.
Fix 5: call exports later
If you write your own scripts, avoid calling another resource's export at the top of the file, while everything is still loading. Call it inside an event or after the dependency is confirmed to be running.
AddEventHandler('onResourceStart', function(resourceName)
if resourceName ~= 'my-framework' then return end
-- safe to use exports from my-framework here
end)
What not to do
Don't create an empty export just to make the message go away. The calling script will get nothing back and fail somewhere else, and the real problem is hidden.
Still stuck?
Check the installation guide for the usual first-time mistakes and the entitlement guide if the provider is a paid script that failed to start. If one of our scripts is involved, open a ticket in our Discord with the full console output from the start of the server.