@nestjs/typeorm 12 is an ESM-only package that needs Node 20.19 and leaves the tutorial to the Nest docs
TypeORM module for Nest framework (node.js) 🍇
At a glance
- What is it?
- @nestjs/typeorm is the TypeORM integration module for the Nest framework. The README is one install command and one link, so the facts that matter sit in package.json: module type, Node floor, peer ranges and the test setup.
- Who is it for?
- Install @nestjs/typeorm if you run a Nest application and have decided on TypeORM as your data layer, and are on Node 20.19.0 or newer. The package ships ESM and sends you to the Nest docs for the tutorial; test CommonJS interoperability with your Node version and dependency graph.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- nestjs/typeorm2,170 ★ · +8
| Repository | 2026-10-09 | 2026-11-25 |
|---|---|---|
| nestjs/typeorm | 2.2k | 2.2k |
8 Stars in the last 47 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The install is two packages, and TypeORM itself is not bundled
The README describes the project in one line: a TypeORM module for Nest. The installation block lists both packages you need:
$ npm i --save @nestjs/typeorm typeormThe module and typeorm itself are separate installs, which tells you the integration does not carry the ORM inside it. You choose the TypeORM version, subject to whatever the peer ranges allow. The repository's own development dependency is typeorm 1.1.2, which is the version its tests run against.
The Quick Start is a single link to the Overview and Tutorial at docs.nestjs.com/techniques/sql. There is no code in the README showing how to register the module, define an entity or inject a repository, so the usage documentation lives on the Nest site and not in this repository. Treat that docs page as the real manual, and treat the README as a package label.
Version 12 ships ESM and CommonJS interoperability depends on Node
The package.json sets type to module, and the exports map offers only import and default entries pointing at ./dist/index.js, with types at ./dist/index.d.ts. There is no separate CommonJS build or require condition, but the default export target can be resolved. Node 20.19 and newer can require synchronous ESM by default; a dependency graph containing top-level await requires asynchronous loading. Test the actual application and toolchain.
The main field also points to ./dist/index.js, and the exports map exposes ./package.json as a second subpath. Nothing else is exported, so deep imports into dist will be blocked by the map.
The release history shows how recent the 12 line is. 12.0.0 was published on 2026-08-27, 12.0.1 on 2026-08-28 and 12.0.2 on 2026-09-28. A patch release a day after the major suggests a fix landed straight away, though the README carries no release notes. If you are on an earlier major, read the release page before upgrading, because a module system change is the sort of break that can fail at startup rather than at build time.
Node 20.19.0 is the floor, and the Nest peer range spans three majors
The engines field requires Node >=20.19.0. This floor coincides with Node 20.19 enabling require(esm) by default. npm normally warns for an incompatible engine unless engine-strict is enabled; use a supported Node version regardless. If a container image or CI runner is on an older Node 20 or on Node 18, it has to change first.
The peerDependencies for @nestjs/common allow ^10.0.0 || ^11.0.0 || ^12.0.0. One module can therefore sit in Nest applications on three majors at once. The repository's own devDependencies use @nestjs/common, @nestjs/core, @nestjs/platform-express and @nestjs/testing at 12.3.2.
The breadth of the range means the tests here exercise one major, and the others are allowed rather than demonstrated by the dev setup. If you are on Nest 10, run your own integration tests after installing this module.
reflect-metadata 0.2.2 and rxjs 7.8.2 appear as development dependencies, which hints at the runtime pieces a Nest application brings with it. The package has no required runtime dependencies listed in the part of the manifest that is visible.
Tests run against Postgres in Docker, and the compose file maps port 3306 to 5432
The repository's docker-compose.yml starts one service, postgres, from the image postgres:18.6:
version: "3"
services:
postgres:
image: postgres:18.6
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: test
ports:
- "3306:5432"
restart: alwaysThe user and password are both root and the database is test. The port mapping publishes host port 3306 to container port 5432. Port 3306 is the conventional MySQL port, and 5432 is the Postgres one, so the mapping looks like a leftover from an earlier MySQL setup. If you run the tests locally and something else already listens on 3306, the container will fail to bind.
Both drivers appear in devDependencies: mysql 2.18.1 and pg 8.23.1. The test scripts are test:e2e, which runs vitest run --sequence.sequential, and test:e2e:dev for watch mode. Running sequentially matters when tests share one database.
Contributor tooling is oxlint, Vitest, commitlint and release-it
A contributor will meet a specific toolchain. Linting uses oxlint with an oxlint.config.ts file, and formatting uses prettier over TypeScript files. Tests use Vitest, configured in vitest.config.ts, with supertest for HTTP checks. Commit messages go through commitlint with the Angular config, and husky and lint-staged run hooks on commit through the prepare script.
The build script removes dist and runs tsc against tsconfig.json. TypeScript is pinned to ~7.0.0 in devDependencies. Publishing goes through release-it, with prepublish steps that rebuild first. There are two publish paths: publish:npm for the default tag and publish:next, which publishes with the next tag for pre-release versions.
Other top-level files include renovate.json for automated dependency updates, a .circleci directory, CONTRIBUTING.md and .npmignore. A project with this much automation changes dependency versions frequently, so expect a stream of small bumps rather than hand-edited releases.
Who maintains it, what it costs and what the README leaves out
The package is MIT licensed, authored by Kamil Mysliwiec, and the README says Nest is an open source project that grows through sponsors and backers. The repository is not archived, and the last push was on 2026-10-21.
What the README omits is the useful part. It has no configuration example, no description of the forRoot style of setup, nothing on entities, repositories, migrations or transactions, and no troubleshooting section. Everything beyond installation is delegated to docs.nestjs.com/techniques/sql. A reader who searches for how to use TypeORM with Nest will find that the repository answers only the install question.
The code lives under lib, with tests in a tests directory. If the documentation page is vague about a behavior, the source and the e2e tests are the next place to read, since they show the module being wired into a real Nest application against a database. Keep that in mind before you file an issue about something the Nest docs already cover.
Editorial conclusion
Install @nestjs/typeorm if you run a Nest application and have decided on TypeORM as your data layer, and are on Node 20.19.0 or newer. The package ships ESM and sends you to the Nest docs for the tutorial; test CommonJS interoperability with your Node version and dependency graph. Before upgrading to 12, check that your @nestjs/common version falls inside the peer range and that your toolchain can import an ESM-only package.
Frequently asked questions
How to install TypeORM in NestJS?
Run npm i --save @nestjs/typeorm typeorm. The README points to docs.nestjs.com/techniques/sql for the overview and tutorial.
What is TypeORM in NestJS?
@nestjs/typeorm is the TypeORM module for the Nest framework. It is MIT licensed, and the current release is 12.0.2.
How to use TypeORM in NestJS?
Install @nestjs/typeorm and typeorm, then follow the Overview and Tutorial linked from the README at docs.nestjs.com/techniques/sql. The README itself contains no usage code.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nestjs-typeorm)Star history chart for your README
[](https://hysenlabs.com/projects/nestjs-typeorm)Was this useful?