PlayDeck
Home / Guides / Why your FiveM resource is erroring on start (manifest fixes)

Why your FiveM resource is erroring on start (manifest fixes)

When a FiveM resource errors on start, the problem is almost always in its fxmanifest.lua. The manifest is the contract that tells FiveM what game version to target, which files to load, in what order, and what the resource depends on. Get one line wrong and the resource either fails to start or, worse, silently appears in the list but never initializes.

This guide covers the mandatory manifest lines, how file paths and load order work, the syntax mistakes that quietly break the parse, and how to declare dependencies so FiveM enforces them for you.

The mandatory lines every manifest needs

A valid fxmanifest.lua must declare at minimum fx_version and game. The fx_version sets the manifest format (use 'cerulean' for modern resources), and game sets the target, normally 'gta5'. Without both, FiveM cannot start the resource and logs a manifest error.

From there you declare your code. client_scripts loads on players, server_scripts loads on the server, and shared_scripts loads on both. Put files in the right block: a server-only file in client_scripts will run in the wrong context and throw confusing errors about missing natives or missing server functions.

File paths and load order inside the manifest

Every file you list must exist at exactly that path, relative to the resource root, with exactly that capitalization. On Linux servers (most hosts), client/Main.lua and client/main.lua are different files, and a mismatch makes the resource fail to find the file and error on start.

Order inside a block matters too. Files load top to bottom, so your config.lua must be listed before any file that reads Config. If a script throws "attempt to index a nil value (global 'Config')" the instant it loads, the fix is usually to move config.lua earlier in shared_scripts, ahead of the file that uses it.

You can use glob patterns like 'client/*.lua' to grab a whole folder, but globs do not guarantee a specific order between matched files. If two files depend on each other, list them explicitly in the order you need rather than relying on a wildcard.

Syntax mistakes that silently break the parse

The manifest is Lua, so it follows Lua syntax. The most common breakages are a trailing comma in a list, an unclosed brace, and curly smart-quotes pasted from a website instead of straight ' or " quotes. Any of these makes FiveM report "could not parse" and refuse the resource.

If the console points at a line in fxmanifest.lua, open it and check that line and the one above it. Balance every { with a }, every ' with a ', and remove any comma after the last item in a list. A linter, or an AI that reads the whole manifest at once, spots these immediately, which is why builders using PlayDeck's workflow rarely lose time to manifest typos.

One more gotcha: mixing the old __resource.lua and the new fxmanifest.lua in the same resource. Use only fxmanifest.lua for modern resources. If both exist, delete the old one to avoid conflicting declarations.

Declaring dependencies correctly

If your resource needs ox_lib, oxmysql, or a framework, declare it: dependency 'ox_lib' for one, or dependencies { 'oxmysql', 'ox_lib' } for several. This makes FiveM refuse to start your resource until those are running, which prevents a whole class of nil-export crashes.

But the dependency line is only a safety net. It does not start the dependency for you. You still have to ensure that dependency earlier in server.cfg. If you declare a dependency that is not installed or not ensured, your resource correctly refuses to start, and the fix is to add and order the missing resource.

Get the manifest right and most start-time errors vanish. PlayDeck teaches resource structure with an AI that scaffolds a correct fxmanifest.lua from a plain-English description, then explains each line so you understand what you shipped. Join the waitlist to build your first resource the right way.

Frequently asked questions

My resource shows in the list but never runs. Why?

A malformed or incomplete manifest can make a resource appear in the resource manager yet never initialize. Check that fx_version and game are present and that every file path in the manifest exists and is spelled correctly.

What does "could not parse" mean for a manifest?

It means the fxmanifest.lua has a syntax error: usually a trailing comma, an unclosed brace, or smart-quotes instead of straight quotes. Open the line the console names and fix the Lua syntax.

Should I use fxmanifest.lua or __resource.lua?

Use fxmanifest.lua. __resource.lua is the legacy name and still works, but you should not have both in one resource. Delete the old one to avoid conflicting declarations.

Why does my config load as nil?

Load order. In shared_scripts, config.lua must be listed before any file that reads Config. If it loads after, Config is nil when the other file runs and you get an index-nil error on boot.

Build this with AI, no CS degree

PlayDeck teaches you to build and sell GTA roleplay scripts with AI, you steer it and it writes the Lua. GTA 6 is coming. Get on the frontline now.

Join the waitlist