{"id":25995,"library":"ngx-zombie-compiler","title":"ngx-zombie-compiler","description":"Fast JiT compiler for Angular unit testing that reuses compiled results across specs to reduce execution time. Current stable version 0.3.0, compatible with Angular 4.2+. Unlike default Angular TestingCompiler which compiles modules per spec, this compiler outlives the default and caches compiled components. Ships TypeScript types. Low release cadence; last release in 2017. Useful for Angular CLI projects (edit src/test.ts). Few alternatives exist for this niche optimization.","status":"maintenance","version":"0.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/Quramy/ngx-zombie-compiler","tags":["javascript","angular","karma","typescript"],"install":[{"cmd":"npm install ngx-zombie-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add ngx-zombie-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add ngx-zombie-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; provides TestBed and JitCompiler used internally.","package":"@angular/core","optional":false},{"reason":"Peer dependency; provides JitCompiler base class.","package":"@angular/compiler","optional":false}],"imports":[{"note":"Package provides ESM and CJS; default export is not available.","wrong":"const { ZOMBIE_COMPILER_PROVIDERS } = require('ngx-zombie-compiler');","symbol":"ZOMBIE_COMPILER_PROVIDERS","correct":"import { ZOMBIE_COMPILER_PROVIDERS } from 'ngx-zombie-compiler';"},{"note":"Named export, not default.","wrong":"import ZombieCompiler from 'ngx-zombie-compiler';","symbol":"ZombieCompiler","correct":"import { ZombieCompiler } from 'ngx-zombie-compiler';"},{"note":"Internal class not typically needed; use ZOMBIE_COMPILER_PROVIDERS.","wrong":null,"symbol":"ZombieJitCompiler","correct":"import { ZombieJitCompiler } from 'ngx-zombie-compiler';"}],"quickstart":{"code":"import { TestBed, getTestBed } from '@angular/core/testing';\nimport { ZOMBIE_COMPILER_PROVIDERS } from 'ngx-zombie-compiler';\n\nbeforeEach(() => {\n  getTestBed().configureCompiler({\n    providers: ZOMBIE_COMPILER_PROVIDERS,\n  });\n});\n\n// Then write your tests normally","lang":"typescript","description":"Configures TestBed to use the zombie compiler, reusing compiled results across specs."},"warnings":[{"fix":"Upgrade to ngx-zombie-compiler@0.3.0 and ensure @angular/core and @angular/compiler are >=4.2.0.","message":"Version 0.3.0 requires Angular 4.2.0+ due to breaking change in JitCompiler constructor. Older versions incompatible.","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Consider testing with Angular 5+; if compilation fails, look for alternatives or fork.","message":"Package has not been updated since Angular 4. May not work with Angular 5+ due to changes in compiler internals.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"Call getTestBed().configureCompiler({ providers: ZOMBIE_COMPILER_PROVIDERS }) inside each beforeEach() or in a setup function per test suite.","message":"ZOMBIE_COMPILER_PROVIDERS must be provided in beforeEach(), not once at top level, to avoid cross-test contamination.","severity":"gotcha","affected_versions":"all"},{"fix":"For AOT, use Angular's default TestBed or @angular/platform-browser-dynamic testing utilities.","message":"Does not support AOT compilation; only JiT. AOT tests may need jasmine or jest configuration.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install ngx-zombie-compiler --save-dev","cause":"Package not installed or typo in import path.","error":"Error: Can't resolve 'ngx-zombie-compiler'"},{"fix":"Ensure @angular/core is version 4.x.x or later. For Angular 2.x, use deprecated methods.","cause":"Using old Angular version where TestBed.configureCompiler does not exist.","error":"TypeError: TestBed.configureCompiler is not a function"},{"fix":"npm install @angular/compiler@^4.2.0","cause":"Missing @angular/compiler peer dependency.","error":"Error: StaticInjectorError[ZombieCompiler]: NullInjectorError: No provider for JitCompiler!"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}