#465·madge

v8.0.0 incompatible with TypeScript 7 (with workaround)

Author: johnhunterCreated Aug 26, 2026Updated Sep 9, 2026

Madge 8.0.0 declares TypeScript ^5.4.4, while current TypeScript is 7.x.x; its dependency tree resolves @typescript-eslint/typescript-estree, which accesses the removed/changed ts.Extension.Cjs surface during startup.

The following error is output:

madge --circular --extensions ts,tsx src

<project-path>/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js:59
    ts.Extension.Cjs,
                 ^

TypeError: Cannot read properties of undefined (reading 'Cjs')
    at Object.<anonymous> (<project-path>/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js:59:18)
    at Module._compile (node:internal/modules/cjs/loader:1934:14)
    at Object..js (node:internal/modules/cjs/loader:2074:10)
    at Module.load (node:internal/modules/cjs/loader:1656:32)
    at Module._load (node:internal/modules/cjs/loader:1448:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
    at Module.require (node:internal/modules/cjs/loader:1679:12)
    at require (node:internal/modules/helpers:196:16)
    at Object.<anonymous> (<project-path>/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js:45:18)
    at Module._compile (node:internal/modules/cjs/loader:1934:14)