Web & NUI
Packages
Packages has its own button on the rail (the braces, under Database). It works on the app the open file belongs to: the nearest package.json above it, or, when there is none, one in a folder right under the file's (a resource's Lua beside its web/ app).
- The package manager is chosen per project: npm, pnpm, bun or yarn. The default is bun, but an existing lockfile wins.
- One-click Install, Add package (with a dev toggle) and remove
- A "package.json changed · N missing" warning, and an editor banner when an app's imports are missing because nothing is installed yet
- The TypeScript quick fix Install 'x' installs the whole app's
package.json - Add FiveM types (
@citizenfx/client,@citizenfx/server)
Scripts
Every script in package.json gets Run / Stop and runs in its own named terminal, with a status dot. When a dev server prints its address (Vite's Local:), it shows up as a chip that opens the browser.
ui_page dev / build
The In-game UI card in the manifest form switches ui_page between the dev server and the build, and updates files {} to match.
NUI wiring checks
K3 Studio matches the NUI names a resource's Lua and its page use, and flags a name only one side has:
- The page never calls this NUI callback. A
RegisterNUICallbacknofetchreaches. - No RegisterNUICallback in this resource answers this. A
fetchto a callback nobody registers. - The page doesn't handle this message. A
SendNUIMessageaction the page never listens for. - No SendNUIMessage in this resource sends this. A message the page listens for that the Lua never sends.
When a check is wrong about your code (a dev-only driver that fakes messages in the browser, say), silence it with a comment: // k3-ignore-file: dev mock at the top of the file, or k3-ignore / k3-ignore-next-line for single lines. See Silencing a check.
Chrome 103 compatibility
FiveM's CEF is Chrome 103. K3 Studio warns about newer CSS features and APIs in NUI files, and about a vite config that has no build target.