FiveM and QBCore startup

QBCore script not starting? Fix the resource before rewriting it.

A QBCore resource that refuses to start usually has one of five causes: the server cannot find it, the manifest is wrong, a dependency starts too late, an export changed, or a config value is missing.

Use this prompt in Stellar AI:

My QBCore resource is not starting. Here is the first server console error, fxmanifest.lua, resource folder name, dependency order and the code around the failing line. Diagnose the likely cause first, then give the smallest safe patch.

Start with resource discovery

Before editing Lua, make sure FXServer can see the resource. Many startup failures are caused by a nested folder from a downloaded archive. The manifest should sit directly inside the resource folder, not one folder deeper. If the server says the resource cannot be found, run refresh, confirm the folder path and use a simple folder name without spaces. A resource discovery problem is not a QBCore coding problem, so do not waste time changing gameplay files until the server can load the folder.

Read the first real console error

When one resource fails, the console may produce several follow-up errors. The first useful error is the one you should debug. Later messages often come from other files trying to use objects that never loaded. Copy the first error, the file path and the line number. Then inspect that line and the few lines above it. Syntax mistakes are often reported where Lua finally becomes unable to parse the file, not always where the missing comma or bracket actually began.

ensure qb-core
ensure ox_lib
ensure my-custom-resource

Check the manifest and shared files

The manifest controls what loads, where it loads and in what order. If a config file is used by both client and server code, load it before those files. If a file is listed in the manifest but does not exist, the resource may fail before your feature logic runs. If a file exists but is not listed, the server will never execute it. Compare the manifest against the actual folder tree instead of assuming they match.

Confirm dependency order

A script that uses QBCore exports needs QBCore already running. A script that uses ox_lib needs ox_lib already running. A script that queries the database needs the database resource already connected. Put framework and library resources above the custom resource. If you are using a hosting panel or txAdmin recipe, inspect the final startup order because generated config can differ from the file you think is active.

Check exports and framework versions

Older QBCore resources can use patterns that do not match your installed framework version. If an export is nil or a function is missing, check whether the resource was written for another build. Do not patch every file at once. First confirm the dependency exists, then confirm the export name, then test one small call. If the script came from another server, compare assumptions such as job names, inventory type and menu library.

Validate config values

Config mistakes can look like startup problems. A missing job, grade, item, locale string, coordinate table or feature toggle can cause nil values during start. Search for the exact config key used on the failing line. Check each parent table before the final value. If the resource expects Config.Locations.Police.Armory, any missing level can break the script.

Use a minimal reproduction

When the cause is not clear, create a private test copy of the resource. Keep the manifest, one config file and the smallest failing feature. Remove optional systems until the error either disappears or becomes obvious. This tells you whether the problem belongs to the script, dependency order, database setup or production data.

What to give Stellar AI

Paste the first error, manifest, folder tree, start order, framework version and the code around the error. Ask for diagnosis before a rewrite. A strong fix should say which dependency or value is missing, show the exact file to edit and include a test plan. It should not replace the whole resource when the real issue is one line of manifest, folder layout or config.

Private testing checklist

After a patch, restart only the affected resource if possible. Confirm the first error is gone. Join with one test character, trigger the feature and test the denied path too: wrong job, wrong grade, missing item or invalid state. If the feature touches money, inventory or permissions, verify server-side checks before going live. Keep notes so you can undo a change if the next error is unrelated.

Fix it with Stellar AI

Paste your first console error and manifest into Stellar AI. Start with the smallest safe patch and test it privately before using it on a live server.

Open Stellar AI free →