# SERVER_CODE_NOT_ALLOWED

Server code or build configuration is not allowed.

- **HTTP class:** 422
- **Retryable:** no

## What happened

A file is server code, framework source or build configuration, which a static host never runs.

## Fix

Run the project's build and send only its output folder (for example `dist/`); the [frameworks page](https://carnival-staging.dev/docs/frameworks.md) names each framework's folder.

## What to tell the user

Carnival hosts static files only: a site that needs a server (logins, stored form data, payments) can't run on it.

## Agent hint

The exact `error.hint` text; Carnival fills each `<…>` for the call.

```text
<path> is server code or build config. Run the build and send only its output folder (for example dist/).
```

## Related

- [`DISALLOWED_FILE_TYPE`](https://carnival-staging.dev/docs/errors/DISALLOWED_FILE_TYPE.md): This file type is not allowed.
- [`MISSING_INDEX_HTML`](https://carnival-staging.dev/docs/errors/MISSING_INDEX_HTML.md): index.html is missing.

All error codes: [error codes](https://carnival-staging.dev/docs/errors.md)
