You drop a new resource into your server, add an ensure line to server.cfg, and restart — only to be greeted by a wall of red text in the console. Resource loading errors are the most common pain point on any FiveM server, and almost every one of them has a straightforward fix once you know where to look. This guide walks through the most frequent errors — could not load resource, manifest parse failures, missing dependencies, and SCRIPT ERROR lines referencing citizen:/scripting — and shows you exactly how to resolve them.
How FiveM Loads Resources
Every resource is a folder inside your server’s resources/ directory. The folder must contain a file named fxmanifest.lua at its root. FiveM reads that manifest before executing any scripts — if the manifest is missing, malformed, or references files that do not exist, the resource will not load.
Resources are started in the order that ensure lines appear in server.cfg. The ensure command starts a resource if it is stopped, or restarts it if it is already running. The start command only starts a stopped resource. Neither command changes the fact that resources load sequentially — if Resource B depends on exports from Resource A, Resource A’s ensure line must come first.
Folders named with square brackets, like [standalone] or [qb], are category folders. They do not need their own manifest; they just group resources. You can start every resource inside one with ensure [categoryname].
Reading the Server Console
Before fixing anything, you need to read the right output. Open your server console (or your txAdmin live console) and look for lines that contain:
Could not load resource— the resource failed to start entirelySCRIPT ERROR— a Lua (or JS/C#) runtime error inside a running scriptNo such export— a script tried to call an export that was not registereddoes not have a resource manifest— nofxmanifest.luafoundError parsing script— a file declared in the manifest has a Lua syntax error
Every error line names the resource responsible. Start there — do not guess.
Error 1: “Does Not Have a Resource Manifest”
FiveM logs this when a folder inside resources/ has no fxmanifest.lua at its root. Common causes:
- The download was a ZIP archive and you extracted it one folder level too deep, so the real resource folder is nested inside another folder with the same name (e.g.,
resources/ox_lib/ox_lib/fxmanifest.lua). - The file is named
__resource.lua— this is the legacy manifest format. It still works for older resources but many modern features requirefxmanifest.lua. - The file name has a typo or wrong capitalisation. On Linux servers the filesystem is case-sensitive;
FXManifest.luawill not be found.
Fix: Verify the folder structure. The correct layout is:
resources/
└── ox_lib/
├── fxmanifest.lua
├── init.lua
└── ...
Error 2: Manifest Parse Failures (fx_version and game)
If fxmanifest.lua exists but has a syntax error or missing mandatory fields, FiveM logs a parse error and refuses to load the resource. Every valid manifest requires exactly two fields:
fx_version 'cerulean'
game 'gta5'
fx_version controls which FiveM APIs and features are available to the resource. The current standard value is 'cerulean'. If you are porting a very old resource, you may see 'adamant' or 'bodacious' — these still work, but upgrading to 'cerulean' unlocks modern features. The game field must be 'gta5' for FiveM, 'rdr3' for RedM, or 'common' if the resource targets any CitizenFX game.
Script declarations follow. Use client_script, server_script, or shared_script for single files, or their plural table forms for multiple files:
fx_version 'cerulean'
game 'gta5'
client_scripts {
'client/main.lua',
'client/utils.lua'
}
server_script 'server/main.lua'
shared_script '@ox_lib/init.lua'
A script path prefixed with @resource_name/ references a file inside another resource — this is how ox_lib‘s shared init file is typically loaded. If the referenced resource is not installed, the manifest will fail to parse.
Error 3: Missing Dependencies and Wrong Load Order
This is the single most common source of Could not load resource and No such export errors on FiveM servers. When Resource A calls an export from Resource B, Resource B must have already started — meaning its ensure line must appear before Resource A’s line in server.cfg.
You can declare dependencies explicitly in the manifest. FiveM then enforces load order — your resource will not start until the listed dependencies are already running:
fx_version 'cerulean'
game 'gta5'
dependencies {
'oxmysql',
'ox_lib'
}
Declaring a dependency does not automatically start a resource you never ensured — you still need to ensure it in server.cfg. What it does do is enforce ordering: your resource refuses to start until its declared dependencies are running, so it cannot load too early. A typical correct ordering for a QBCore or ox-stack server looks like:
# Core infrastructure first
ensure oxmysql
ensure ox_lib
# Framework
ensure qb-core # or es_extended for ESX
# Framework modules
ensure qb-menu
ensure qb-input
# Standalone scripts that depend on the framework
ensure my-custom-job-script
If restarting a resource manually (via ensure resource-name in the live console) makes the error go away, that is a strong signal the issue is load order — everything it depends on is now running, so it works on the second attempt but fails on cold boot.
Error 4: SCRIPT ERROR and citizen:/scripting Lines
SCRIPT ERROR lines appear when a resource’s Lua (or JavaScript, or C#) code throws a runtime error. The path citizen:/scripting/lua/scheduler.lua that often appears in the stack trace is FiveM’s internal Lua runtime scheduler — it is not a file in your resources folder. It surfaces in traces because FiveM’s coroutine scheduler is wrapping your script. The actual error is almost always one level deeper in the trace, in a file that belongs to your resource.
Common patterns and fixes:
No such export 'fetchSync' in resource oxmysql— oxmysql is not started or starts after the resource calling it. Moveensure oxmysqlto the top of your resource block.attempt to index a nil value— a variable expected to hold a table or object isnil, usually because a dependency did not initialise in time or returned nothing.Error parsing script @resource/file.lua— Lua syntax error in that file. Check for missingendkeywords, mismatched brackets, or non-UTF-8 characters.
Quick-Reference: Common Errors and Fixes
| Console message | Most likely cause | Fix |
|---|---|---|
| does not have a resource manifest (fxmanifest.lua) | Folder nested one level too deep after extraction; wrong filename casing on Linux | Move fxmanifest.lua to the resource root; check capitalisation |
| Could not load resource [name] | Manifest parse error, missing dependency, or bad ensure name in server.cfg | Check manifest syntax; confirm folder name matches ensure line exactly |
| No such export ‘[fn]’ in resource [dep] | Dependency not started or starts too late | Move dependency’s ensure line above the consuming resource |
| SCRIPT ERROR: Error parsing script | Lua syntax error in a declared script file | Open the named file, fix the syntax error, ensure the resource again |
| Missing dependency ‘[name]’ | Resource declared in dependencies {} is not installed or not ensured | Install the missing resource and add ensure [name] to server.cfg |
Step-by-Step Diagnostic Workflow
When a resource refuses to load, work through these steps in order:
- Check the console for the exact error message. Copy it — do not rely on memory.
- Confirm the folder name matches the
ensureline exactly. On Linux,OX_Libandox_libare different folders. - Verify
fxmanifest.luais at the resource root, not inside a subfolder. - Open
fxmanifest.luaand confirmfx_versionandgameare present. - Check every file path listed in the manifest —
client_scripts,server_script, etc. — against the actual files on disk. Paths are case-sensitive on Linux. - If the error mentions a missing export or dependency: find that resource in your
resources/folder, confirm it is installed, and move itsensureline above the failing resource inserver.cfg. - Run
refreshin the server console after adding a new resource. This rescans the resources folder and makes newly added resources visible toensure. - Test with
ensure [resource-name]in the live console after fixing — you get immediate feedback without a full server restart.
If you are installing a complex framework like ox stack or QBCore for the first time, the FiveM server documentation covers the full setup process including verified load-order examples. For issues specific to ox_lib, see our ox_lib setup guide.
Preventing Errors Before They Happen
A few habits eliminate most resource errors permanently:
- Group resources into category folders (
[standalone],[qb],[ox]) and use a singleensure [category]line per group. Fewer individualensurelines means fewer ordering mistakes. - Always declare
dependencies {}in your custom manifests. Even though it does not enforce load order, it documents intent and produces useful warnings. - Use txAdmin’s resource manager to start and stop individual resources during testing — it shows live console output and makes it easy to isolate which resource is throwing errors without restarting the whole server.
- Test on a staging copy before adding resources to a live server. A quiet environment makes parse errors and ordering issues far easier to spot.
If you are spending more time fighting resource errors than building your server, consider moving to managed hosting where the base server environment, framework, and core resources come pre-configured. Our FiveM server hosting plans include txAdmin access and a one-click framework installer so you can focus on your scripts instead of your stack. You can also find related guidance in our FiveM server backup guide — taking a backup before installing new resources is the fastest recovery path when something breaks.
Frequently Asked Questions
What is the difference between “ensure” and “start” in server.cfg?
start [resourceName] only starts a resource that is currently stopped — it does nothing if the resource is already running. ensure [resourceName] is more flexible: it starts the resource if it is stopped, and restarts it if it is already running. For most server.cfg entries, ensure is the correct choice because it is idempotent and survives repeated server restarts cleanly. Both commands also accept category names in square brackets, such as ensure [standalone].
Why does my resource work after I manually restart it but fail on server startup?
This is almost always a load-order issue. On cold boot, one of your resource’s dependencies had not finished starting when your resource attempted to call its exports. When you manually restart the resource later, all dependencies are already running, so the export is available and the call succeeds. The fix is to move the dependency’s ensure line above your resource’s line in server.cfg, so the dependency is fully started before your resource tries to use it.
What does “citizen:/scripting/lua/scheduler.lua” mean in a SCRIPT ERROR?
The citizen:/scripting/ path prefix refers to FiveM’s internal scripting runtime files — not files inside your resources folder. When this path appears in a stack trace, it means FiveM’s Lua scheduler or runtime caught an error that originated in your script code. Read one or two lines further down the stack trace to find the actual file and line number inside your resource that caused the error. Fixing that specific line will resolve the error; the citizen:/scripting line itself is just the internal wrapper showing through.
Ready to play?
Run your own FiveM server with XGamingServer
Spin up an always-on FiveM server your friends can join in minutes — no port-forwarding, no tech headaches.







