Error codes

Every error Raiko can raise for a mistake in your code has a code, a help line and an entry here.

CodeWhat happenedFix
RK0100The app directory does not exist.Create app/page.tsx, or pass appRouter({ dir }).
RK0101A folder name uses brackets in an unknown way.Use [param], [...param] or [[...param]].
RK0102A folder has two files of the same kind, like page.tsx and page.ts.Keep one of them.
RK0103A folder has both page and route files.A folder is a page or an API route: move one.
RK0104Two routes use different param names at the same position.Use the same name in both routes.
RK0105A wildcard is not the last path segment.Move * to the end, like /files/*.
RK0106A param has no name.Write :id instead of :.
RK0110A page exports auth or roles, but appRouter has no getUser.Pass appRouter({ getUser }).
RK0201headers(), cookies() or another request helper ran outside a request.Call it inside a page, layout, route or component.
RK0301<Image> has no alt text.Describe the image, or use alt="" for decoration.
RK0400The auth secret is shorter than 32 characters.Run npx raiko secret and put it in AUTH_SECRET.
RK0402A TOTP secret has characters outside base32.Use generateTotpSecret() to create secrets.
RK0403cors({ credentials: true }) has no explicit origin list.Pass origin: ["https://your.app"].
RK0501The SMTP transport needs nodemailer.bun add nodemailer
RK0502An email template name is not registered.Add it to createMailer({ templates }).
RK0503An email has no subject.Pass subject, or set Template.subject.
RK0601An admin permission uses an unknown action.Use list, read, create, update, delete or *.
RK0701raiko start found no build.Run raiko build first.
RK0702raiko deploy found no target.Run raiko deploy vercel, cloudflare or docker.
RK0703raiko deploy got an unknown target.Use vercel, cloudflare or docker.
RK0801The project folder is not empty.Pick another name, or pass --force.
RK0802StyleX was picked without React.Use --frontend react, or another CSS option.
RK0803The project name is not a valid npm name.Use lowercase letters, digits, dot, dash and underscore.
RK0901A client path param is "." or "..".Those would move the request to another endpoint: validate the value.