Couldn't start resource: why FiveM won't start your script

Couldn't start resource X or Failed to start resource in your FiveM console? The usual causes (manifest, folder name, Lua error, dependency, escrow) and how to find yours.

You run ensure my_script or start the server, and the console prints:

text
Couldn't start resource my_script.

That line only tells you the result. The cause is in the lines above it. This guide lists the usual causes, in the order worth checking, and shows how to read the console to know which one you have.

Read the lines above first

Scroll up from Couldn't start resource in the server console, or in the txAdmin live console. The line directly above is almost always the reason: a missing dependency, a parse error with a file and line number, or a manifest problem.

If the console is too noisy, stop the server, start it again, and run only the failing resource:

text
ensure my_script

Now everything printed right after that command belongs to the resource.

1. The resource is not found

text
Couldn't find resource my_script.

FiveM looks for a folder named exactly my_script somewhere under resources, and that folder must contain a file named fxmanifest.lua (or the old __resource.lua). Check three things:

  • The name in server.cfg matches the folder name, letter for letter. On a Linux host, My_Script and my_script are different.
  • The manifest file is named fxmanifest.lua, not fxmanifest.lua.txt (Windows hides known extensions) and not fxmanifest (1).lua.
  • Run refresh in the server console after adding a new folder, then ensure again. A running server does not scan for new folders until you do.

2. Nested folder after unzipping

This is the most common mistake with downloaded scripts. You unzip my_script.zip and end up with:

text
resources/
  my_script/
    my_script/
      fxmanifest.lua
      client/
      server/

The manifest is one level too deep, so FiveM sees my_script as a plain folder with no manifest. Move the inner folder up so that fxmanifest.lua sits directly inside the folder you ensure.

Category folders written in brackets, like [mic], are fine: FiveM looks through them. A resource inside another resource is not.

3. A Lua syntax error on load

text
Error parsing script @my_script/server/main.lua in resource my_script: @my_script/server/main.lua:42: unexpected symbol near 'end'
Couldn't start resource my_script.

The message names the file and the line (main.lua:42). Open that line and look at the one before it as well: a missing end, a missing comma in a table, or a stray character from a bad copy and paste. Fix it, then ensure again.

Two causes that look like syntax errors but are not:

  • The script uses Lua 5.4 syntax (<const>, <close>, integer division) and the manifest lacks lua54 'yes'.
  • The file was saved with a different encoding or has a BOM. Save it as UTF-8 without BOM.

4. Missing dependency

text
Could not find dependency ox_lib for resource my_script.
Couldn't start resource my_script.

The manifest asks for another resource that is not on your server. Install it and keep its folder name exact. The full explanation is in Could not find dependency X for resource Y.

5. Manifest errors

A bad fxmanifest.lua stops the resource before any script runs. Check:

lua
fx_version 'cerulean'
game 'gta5'

client_scripts { 'client/*.lua' }
server_scripts { 'server/*.lua' }

Common faults: a missing fx_version or game, a missing comma between entries in a { } list, a file path in the manifest that does not exist, and a path with the wrong slash direction or capitalisation. Use forward slashes. If the resource still ships a __resource.lua, see converting __resource.lua to fxmanifest.lua.

6. Escrow, entitlement and license

Protected (escrowed) scripts check that your server's license key belongs to the Cfx.re account that owns the asset. If it does not, the resource refuses to start and the line above says you lack the entitlement. That is a separate fix: escrow: You lack the required entitlement.

7. The resource starts, then fails in another way

Sometimes the start succeeds and the failure comes a second later, from a SCRIPT ERROR in a script file, such as a nil value from the framework. That is no longer a start problem. Read the error line, find the file and line number, and fix that. If the framework object is nil, start with the ESX or QBCore guide.

A quick way to test the manifest

Start with a clean test resource. Create resources/test_ok/fxmanifest.lua:

lua
fx_version 'cerulean'
game 'gta5'

server_script 'server.lua'

and resources/test_ok/server.lua:

lua
print('test_ok started')

Run refresh then ensure test_ok. If that works, your server and paths are fine, and the fault is inside the resource you are chasing.

Checklist

Symptom Fix
Couldn't find resource my_script. Folder name differs from ensure, or no fxmanifest.lua; run refresh
Folder is my_script/my_script/ Unzipped one level too deep; move the inner folder up
Error parsing script ... unexpected symbol Syntax error at the file and line shown
Could not find dependency Install the dependency, exact folder name
Nothing above the failing line Run ensure alone and read what prints after it
Entitlement or license text Escrow: license key and Cfx.re account must match

Quick answers

What does Couldn't start resource mean?

FiveM found the resource but stopped while starting it. The reason is never on that line: it is one or more lines printed just above it in the console.

Why does it say Couldn't find resource?

The name in ensure does not match any folder under resources, or the folder has no fxmanifest.lua at its top level. Check the spelling and the folder you unzipped.

Can a Lua error stop a resource from starting?

Yes. A syntax error in a script file makes the whole resource fail to load. The console shows the file and the line number of the error.

Scripts that skip this problem

Item Creator V2Create usable items with animations, props, effects and more β€” without writing code.View script β†’Shop CreatorBuild a shop in under a minute β€” owners, employees, vaults and robberies included.View script β†’Quest CreatorA visual editor for quests and NPC dialogues, built node by node in game.View script β†’

Keep reading