bettercap/bettercap · error · Error

In this configuration Angular requires Zone.js

Error message

In this configuration Angular requires Zone.js

What it means

NgZone construction asserts that Zone.js is present and has patched the browser APIs when Angular is configured to rely on zones (ngZone not set to 'noop'). Missing zone.js in this configuration breaks change detection triggering, so Angular throws immediately at bootstrap.

Source

Thrown at modules/ui/ui/vendor.js:57273

        this.onUnstable = new EventEmitter(false);
        /**
         * Notifies when there is no more microtasks enqueued in the current VM Turn.
         * This is a hint for Angular to do change detection, which may enqueue more microtasks.
         * For this reason this event can fire multiple times per VM Turn.
         */
        this.onMicrotaskEmpty = new EventEmitter(false);
        /**
         * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
         * implies we are about to relinquish VM turn.
         * This event gets called just once.
         */
        this.onStable = new EventEmitter(false);
        /**
         * Notifies that an error has been delivered.
         */
        this.onError = new EventEmitter(false);
        if (typeof Zone == 'undefined') {
            throw new Error("In this configuration Angular requires Zone.js");
        }
        Zone.assertZonePatched();
        var self = this;
        self._nesting = 0;
        self._outer = self._inner = Zone.current;
        if (Zone['wtfZoneSpec']) {
            self._inner = self._inner.fork(Zone['wtfZoneSpec']);
        }
        if (Zone['TaskTrackingZoneSpec']) {
            self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);
        }
        if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {
            self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);
        }
        forkInnerZoneWithAngularBehavior(self);
    }
    NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };
    NgZone.assertInAngularZone = function () {

View on GitHub (pinned to 8eca2820f3)

Solutions

  1. Import zone.js (polyfills.ts) before bootstrapping Angular
  2. If intentionally running zoneless, configure NgZone explicitly as 'noop' via provideZonelessChangeDetection / ngZone: 'noop'
  3. Verify the build pipeline does not strip the zone.js polyfill
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/ui/ui/vendor.js:57273 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bettercap/bettercap@8eca2820f3 (2026-09-02). Data as JSON: /api/errors/b819b21f500aa967. Report an issue: GitHub.