sveltejs/kit
Documented errors, page 2 of 4. Back to sveltejs/kit
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| Could not determine width of image | console | warning | enhanced-img, vite-plugin, image-processing, build-warning |
| Invalid environment variable name | validation | error | env, validation, naming |
AbortError The operation was aborted. | exception | error | |
| Cannot "throw fail()". Use "return fail()" | exception | error | sveltekit, actions, fail, developer-error |
| Page options are ignored when `router.type === 'hash | exception | error | hash-router, page-options, config |
| Placing %sveltekit.body% directly inside | console | warning | hydration, html-template, dev-warning |
| `content-security-policy-report-only` must be specified… | exception | error | sveltekit, csp, configuration, security |
| Could not resolve peer dependency | exception | error | dependency-resolution, adapter-auto, node-modules |
| Failed to get response header "set-cookie" — it must be… | exception | error | ssr, cookies, fetch, hooks |
| must export a variables object | validation | error | env, config, sveltekit |
| Missing parameter ' ' in route | exception | error | routing, params, runtime |
| Could not deserialize binary form: invalid file metadata | exception | error | sveltekit, forms, serialization, validation |
| Invalid array key | validation | error | forms, naming, data-conversion |
| DEV: Cannot use ` ` with an external URL. Use… | exception | error | navigation, routing, sveltekit |
| `replaceState(...)` is deprecated. Use `goto | console | warning | deprecation, shallow-routing, client, sveltekit |
| Cannot use `cookies.set(...)` after the response has been… | exception | error | cookies, sveltekit, lifecycle |
| Invalid route ID | exception | error | sveltekit, routing, route-parameters, syntax |
| Missing params for dynamic route ID | exception | error | |
| Can only disable scroll handling during navigation | exception | warning | navigation, scroll, dev-guard |
| Invalid param definition | exception | error | routing, params, syntax, sveltekit |
| must be an array of strings, if specified | validation | error | sveltekit, config-validation, type-error, array |
| Preloading data for failed with the following error: If… | console | warning | preload, dev, console, navigation |
| [SvelteKit] | console | warning | headers, csp, validation, config |
| Avoid using `history.pushState(...)` and… | console | warning | routing, history-api, client-side, conflict |
| Tracing is enabled (see the SvelteKit plugin… | exception | error | tracing, opentelemetry, missing-dependency, observability, sveltekit |
| Could not deserialize binary form: gaps in file data | exception | error | sveltekit, forms, serialization, integrity |
| Files and directories prefixed with + are reserved | exception | error | sveltekit, routing, file-naming, sync |
| Invalid redirect location | exception | error | redirect, header-injection, validation, http, sveltekit |
| Cannot call query.batch | exception | error | prerendering, query-batch, ssg, remote-functions |
| Cannot prerender endpoints with body-dependent methods | exception | error | |
| Could not deserialize binary form: got version | exception | error | |
| must be a valid origin — received ' ' which contains a… | validation | error | sveltekit, config-validation, prerender, origin |
| called uneval before init_transport | exception | error | serialization, devalue, transport, initialization-order |
| The `$app/service-worker` module can only be imported into… | exception | error | service-worker, dev-guard, imports |
| To suppress or handle this error, implement | console | error | prerender, config, build, ssg |
| DEV: Cannot use ` ` with a URL that does not resolve to a… | exception | error | navigation, routing, sveltekit |
| ` ` inputs must have a value | validation | error | |
| XFF_DEPTH is , but only found addresses | http | error | http-headers, proxy, adapter-bun, client-ip |
| does not export `params` from `defineParams | exception | error | vite, dev, params, module-export |
| Could not deserialize binary form: data too short | exception | error | |
| `$env/dynamic/private` is deprecated, use… | console | warning | deprecation, environment, env-variables, imports, sveltekit |
| When using named actions, the default action cannot be… | exception | error | |
| Could not deserialize binary form: duplicate file offset… | exception | error | sveltekit, forms, serialization, validation |
| response.status is not a number. value | exception | error | fetch, mocking, sveltekit, response-status |
| You must remove all `site` keys in | exception | error | cloudflare, wrangler-config, adapter-config, migration |
| Cannot call `fetch` eagerly during server-side rendering… | exception | error | ssr, fetch, dev, relative-url |
| Cannot call ` ` on the server | exception | error | ssr, navigation, sveltekit |
| Data returned from action inside | exception | error | sveltekit, form-actions, serialization, devalue |
| `export const snapshot` is deprecated. Use the `snapshot`… | console | warning | deprecation, snapshot, client-side |
| If you plan to continue deploying to | console | info | adapter-auto, deployment, install, config |
| routes.include and routes.exclude must be arrays | validation | error | cloudflare, adapter-config, routes-json, validation |
| new ValidationError(result.issues) — carries the Standard… | validation | error | validation, standard-schema, remote-functions, zod |
| Each member of must start with '.' — saw | validation | error | config, validation, sveltekit |
| inputs must have a value | validation | error | |
| use:enhance can only be used on | validation | error | sveltekit, forms, dev-only, validation |
| Cannot prerender a root +server.js that returns a non-HTML… | exception | error | prerender, adapter-static, routes, html |
| Multiple values provided for | validation | error | http, headers, security |
| Cannot mix and match file and non-file inputs under the… | exception | error | dev-mode, formdata, remote-forms |
| The configured Vite SSR environment must be a… | exception | error | vite, ssr, dev-server, dependency-mismatch |
| Character escape sequence in | exception | error | routing, routes, unicode, naming |
| Invalid route — a rest route segment is always optional… | exception | error | |
| Invalid value for environment variable | exception | error | environment, validation, adapter-bun |
| Route should be renamed to | exception | error | |
| setHeaders is not allowed in remote functions | exception | error | remote-functions, headers, api-restriction |
| Cannot save as it is already a directory. See… | exception | error | prerender, route-conflict, filesystem |
| Form contained a field that wasn't created with… | validation | error | forms, field-encoding, api-misuse |
| Can only read the current request event inside functions… | exception | error | async-context, asynclocalstorage, request-event, sveltekit |
| The SvelteKit Vite plugin | exception | error | config, adapter, validation, vite |
| Could not find valid | exception | error | package-exports, adapter-auto, dependency-resolution |
| Invalid isr.expiration value | validation | error | config, vercel, isr, validation |
| Invalid route — an [[optional]] route segment cannot follow… | exception | error | |
| `$lib` has been removed. Use `#lib` instead… | exception | error | |
| To use an async `handleError` hook to handle errors that… | console | warning | hooks, async, handleerror, compiler-options |
| Your form contains <input type="file"> fields, but is… | validation | error | sveltekit, forms, file-upload, dev-only |
| snapshot() was called multiple times from the same call… | exception | error | snapshots, duplicate-id, dev-only |
| You must specify the `assets.directory` key in | exception | error | cloudflare, wrangler-config, adapter-config, static-assets |
| : Calling `depends(...)` in a promise handler after… | console | warning | load-function, depends, sveltekit, server |
| : Calling `parent(...)` in a promise handler after… | console | warning | load-function, parent, sveltekit, server |
| `defineEnvVars` has moved — import it from… | exception | error | sveltekit, api-migration, breaking-change, env |
| Invalid cache-control directive | validation | error | cache-control, http-headers, validation |
| Could not determine host from the | http | error | http-headers, proxy, adapter-bun |
| Could not generate a snapshot id from the stack trace. Pass… | exception | error | snapshots, stack-trace, build-pipeline |
| should be an object | validation | error | config, validation, alias, type-mismatch |
| . Since you're using @sveltejs/adapter-auto, SvelteKit… | exception | error | adapter-auto, unsupported-feature, build |
| Cloudflare Pages' _routes.json should be configured from… | exception | error | cloudflare, configuration, build, adapter-cloudflare |
| Could not deserialize binary form: no body | exception | error | |
| Invalid field name : field names are written in JS object… | validation | error | forms, naming, validation |
| should be "fail", "warn", "ignore" or a custom function | validation | error | config, validation, prerender, enum-value |
| Cannot `return error(...)` — use `error(...)` or `return… | exception | error | sveltekit, error-handling, form-actions, api-misuse |
| . Did you mean ? at | console | warning | sync, file-naming, typo |
| cannot be empty | validation | error | config, validation, sveltekit |
| You must specify the `main` key in | exception | error | cloudflare, wrangler-config, adapter-config, static-assets |
| The ` ` option is deprecated, and will be removed in a… | console | warning | deprecation, config, sveltekit |
| The next HMR update will cause the page to reload | console | warning | hmr, dev, error-handling, console |
| is unsupported in . | exception | error | adapter, instrumentation, config, compatibility |
| config.package is no longer supported. See… | exception | error | config, breaking-change, migration, packaging |
| Could not find entry point | exception | error | vercel, build, filesystem, adapter |
| ${log.message ?? String(log)} | exception | error | bun, build, aggregate-error, adapter-bun |
| @sveltejs/adapter-bun requires Bun 1.4 or newer, but this… | exception | critical | version-compatibility, runtime, adapter-bun, bun |
| The `goto(..., )` options have been replaced by `reset… | exception | error | navigation, deprecated-api, sveltekit |