Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PixiConsole
✓ import { PixiConsole } from 'pixi-console'
✗ const PixiConsole = require('pixi-console')
ESM-only; package does not provide a CommonJS dist. Use named import.
PixiConsoleConfig
✓ import { PixiConsoleConfig } from 'pixi-console'
✗ import PixiConsoleConfig from 'pixi-console'
Named export, not default.
PixiConsole.getInstance
✓ import { PixiConsole } from 'pixi-console'; const instance = PixiConsole.getInstance();
✗ import PixiConsole from 'pixi-console'; const instance = new PixiConsole();
PixiConsole is a singleton; use getInstance() to access the existing instance or create first via new. Constructing again throws.
Shows how to import, configure, and attach PixiConsole to a Pixi app stage. Also demonstrates automatic log/error interception.
import { PixiConsole, PixiConsoleConfig } from 'pixi-console';
import * as PIXI from 'pixi.js';
// Create a Pixi application
const app = new PIXI.Application({ width: 800, height: 600 });
document.body.appendChild(app.view);
// Configure console
const config = new PixiConsoleConfig();
config.consoleWidth = 400;
config.consoleHeight = 300;
config.fontSize = 14;
// Create and add to stage
const console = new PixiConsole(config);
app.stage.addChild(console);
// Now console.log and console.error will show on screen
globalThis.__PIXI_APP__ = app;
console.log('Debug message');
console.error('Error message');
Errors
Common errors & fixes
TypeError: PixiConsole is not a constructor
Using require() instead of import; package is ESM-only.
fixUse 'import { PixiConsole } from "pixi-console";' or use dynamic import(). Error: PixiConsole is singleton..
Attempting to create more than one instance via 'new PixiConsole()'.
fixUse PixiConsole.getInstance() to get the existing instance.
Module not found: Can't resolve 'pixi-console'
Missing peer dependency pixi.js or PixiConsoleConfig not installed correctly.
fixRun 'npm install pixi.js pixi-console'.
Audit
Dependencies
pixi.jsrequiredPeer dependency; PixiConsole is a display object that must be added to a Pixi stage.