Building on AdonisJS?
AdonisJS Lucid or Ace commands misbehaving? We ship it properly.
AdonisJS is the TypeScript framework that admits out loud that Laravel got a lot of things right. The ORM, the Ace CLI, the auth guards and the IoC container all carry weight in a real production app, and each has a specific way to go wrong. We work through the Lucid models, the Ace commands, the auth providers and the config flow until the server comes up clean and the tests stay green.
- Since 2015Fixing technology
- FreeEstimates
- US teamReal engineers
adonis-dev.log
still failing
What it is
AdonisJS at a glance
AdonisJS is a full-stack TypeScript framework for Node.js, modelled on Laravel's developer ergonomics but built from the ground up for TypeScript. It was created by Harminder Virk in 2015 and is now in version 6, with a module system, IoC container, Lucid ORM, Vine validation, Ace CLI, guards for auth, and first-class support for templates, mail, queues and websockets.
The framework is used for monolithic web apps, REST APIs and server-rendered sites where a team wants a well-thought-out out-of-the-box experience rather than wiring Express to a dozen third-party packages. It pairs cleanly with Inertia, Vite and React or Vue on the front end, and ships with the sort of batteries-included defaults that make small teams productive quickly.
- Type
- Full-stack TypeScript Node.js framework
- First released
- 2015 initial release, v6 in 2024
- License
- MIT, free and permissive
- Maintained by
- Harminder Virk and the AdonisJS core team
- Typically used for
- Monolithic web apps, REST APIs, server-rendered sites, SaaS back ends
The honest version
AdonisJS pros and cons
No technology is all upside. This is where AdonisJS earns its place and where it tends to cause trouble.
Where AdonisJS is strong
TypeScript firstModels, routes, controllers and services are all typed, including Lucid relations. A broken relationship is a compile error, not a 2am production mystery.
Laravel-shaped productivityRoutes, controllers, migrations, seeders and policies are all one Ace command away. Teams coming from Laravel pick it up in a week.
Honest IoC containerService providers, bindings and dependencies are explicit. Tests are easy to write because you can swap services at the container level rather than monkey-patching modules.
Lucid ORM is pleasantActive-record style models with first-class relationship support, lazy and eager loading, and query scopes, all with the TypeScript types to prove it.
Good defaultsShield for CSRF and CORS, Vine for validation, auth guards for web and API, mail with a dev transport. You can build a real app without choosing eight libraries first.
Where AdonisJS bites
Smaller ecosystem than Express or NestThere are fewer third-party packages, and some Node libraries assume Express-style middleware signatures that need adapting. You build more than you install for niche needs.
Version 5 to 6 was a real migrationThe jump from v5 to v6 restructured the module system and the container API. Upgrades are not a yarn-upgrade; they are a planned refactor.
Lucid eager loading can N+1 silentlyA relation declared without the right preload call behaves correctly but fires one query per record. The symptom is a slow endpoint, not a crash.
Hiring pool is thinnerTypeScript Node engineers are easy to find; AdonisJS-specific experience is not. Teams end up training rather than hiring in.
Auth guards are powerful and fiddlyMultiple guards, custom providers and session versus token flows all interact in ways that reward reading the docs carefully and punish skimming.
Deploy story requires a long-running processAdonis assumes a Node process that stays up, which is at odds with pure serverless targets. For edge or Lambda deployments the framework is not the right fit.
Sound familiar?
Common AdonisJS problems we fix
The AdonisJS problems that bring people to us, and what you have once each one is fixed.
relationship 'posts' is not defined on User
Lucid relation is missing or misconfigured
The model declares a @hasMany but imports the related model from the wrong path, or the relation is accessed on an instance without being loaded. We fix the import, add preload, and the relation works end to end.
Relations load correctly
Migration failed: column already exists
A migration has partially run
A previous run failed halfway and the database is in an in-between state. We check the migrations table against the schema, mark the applied step correctly, and resume from the right point.
Migration graph back in sync
Ace: cannot resolve 'reflect-metadata'
Ace commands fail on a fresh checkout
A missing peer dependency or an outdated tsconfig that stripped experimental decorator metadata. We install the missing package, update tsconfig, and Ace runs the generators again.
Ace commands work on first run
no provider named 'api' registered
Auth guard is not finding its provider
The config/auth.ts guard references a provider that is not registered in the providers section, or the token table does not exist. We wire the provider, run the token migration, and the guard authenticates correctly.
Guards authenticate as expected
Lucid: eager load triggered N+1
Endpoint is slow because of N+1 queries
A loop over records accessing a relation without preload fires one query per record. We add preload at the query site and the endpoint drops to a single joined query plus the preload.
Endpoint back to one-digit queries
E_INVALID_CONFIG: encryption key length
App refuses to boot with an invalid APP_KEY
A key of the wrong length, or missing from the environment on a new machine. We generate a proper 32-character key and document the rotation path.
App boots on every environment
shield CSRF missing on cross-site POST
Shield rejects legitimate API calls
The API routes are accidentally inside the web guard that requires CSRF, or the frontend is not sending the token. We split the routes correctly or supply the token header, depending on which side is actually cross-site.
CSRF applies where it should and not where it should not
Vine: unable to convert 'email' to string
Validation fails on structurally valid input
A Vine schema expecting a string receives an object because the request parser is misconfigured. We fix the parser or the schema and the validation passes.
Validators accept correct shapes
What we do
AdonisJS help, from stuck migrations to managed production
Call us to get one broken Ace command moving, or hand us the whole Adonis back end on retainer.
01
- Rescue
- Lucid N+1s diagnosed, auth guards fixed, migrations unstuck and brought back to a clean state.
02
- v5 to v6 migrations
- Module system updated, container APIs migrated, providers rewritten to the v6 shape, with tests green before the cutover.
03
- Auth design
- Web sessions, API tokens, OAuth providers and policies modeled correctly across the route tree, with guards and providers wired cleanly.
04
- Lucid and database
- Relations, preload strategies, query scopes and migrations reviewed against the real workload, with explain plans on the slow queries.
05
- Managed Tech
- Framework version upkeep, dependency pinning, migration planning and a US engineer on retainer for the days an Ace release changes a generator or Lucid changes its relation API.
How it works
From first message to fixed
1
Look Free estimate
Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.
2
Fix
We fix the cause, not the symptom. If something is down, getting it back up comes first.
3
Harden
Backups, monitoring, updates and access, so the same problem can't quietly come back.
4
Hand back or stay on
You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.
Often found together
Running AdonisJS alongside something else?
We work on the whole stack, so the problem can be wherever it actually is.
Why does Lucid return my relation as null?
Either the relation was not declared correctly on the model, the import points to the wrong file, or the relation was never loaded before access. On a query, use preload('posts') for eager loading, or call .load('posts') on an instance after fetch. Accessing a relation that was not loaded returns undefined in strict mode and a lazy proxy otherwise, which is where the null comes from.
How do I upgrade from AdonisJS 5 to 6?
This is a real migration rather than a dependency bump. The module system, container API and several package layouts changed. Plan it as a branch, follow the official upgrade guide step by step, run the Ace migrations over the config files, and keep the tests passing after each major rewrite. We have run this upgrade on several codebases and can give a timeline based on the size of the app.
Why is my Adonis endpoint slow after adding a relation?
Almost always an N+1 from a loop that accesses a relation without preload. Turn on query logging in development, look for the same SELECT repeated per record, and add a preload at the query site. For deeper trees you can preload nested relations in a single call. The fix is usually a one-line change with a dramatic effect on response time.
Can I run AdonisJS on serverless?
Not well. Adonis assumes a long-running Node process with warm services, a container, a scheduler and persistent connections. You can bend it onto a Node container on Cloud Run or Fly or a plain VM, which is the normal deploy. Pure Lambda or edge runtimes are not what the framework was designed for and we would steer you elsewhere if that is the hard constraint.
How much does AdonisJS help cost?
Initial quotes are free. Describe the version, the modules and what has stopped working, and a US engineer will come back with a scoped price and a plan before touching the code.