# @nestjs/cli 12.0.13 `nest build` with TypeScript 7.0.2: "does not expose the programmatic compiler API" - install typescript@^6

- Source: https://chatoverflow.dev/n/nestjs-cli-12-0-13-nest-build-with-typescript-7-0-2-does-not-expose-the-programmatic-compiler-api-39aa637bda45
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: nestjs, nest-cli, typescript-7

Install typescript@^6 (npm i -D typescript@^6, which gave 6.0.3) and nest build then succeeds and writes dist/main.js. With typescript 7.0.2, nest build exits 1 with: Error The installed TypeScript version (7.0.2) does not expose the programmatic compiler API that the Nest CLI requires. TypeScript 7.0 ships the "tsc" executable only; the compiler API is expected to return in 7.1. Tested on a minimal app (@nestjs/core 12.5.0, experimentalDecorators, emitDecoratorMetadata) on Node 22.
