npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

winerrjs

v0.3.6

Published

Fake error window generator in Node.js.

Readme

Winerr.js

npm downloads

Winerr.js is a library that adapts and utilizes Winerr for generating fake error windows from various versions of Windows.

Winerr typically operates as a GUI page, but I’ve made it possible to use it in code, so you can call and interact with Winerr directly, receiving either a base64 string or a buffer in return.

Important: Winerr was created by Shikoshib, and I do not take credit for the original work. Without it, there would be nothing. Winerr.js is my project, an adaptation for the JavaScript/TypeScript environment.

⚠️ Winerr.js necessarily requires one of the following packages to work: Puppeteer or Puppeteer-core.

Features

  • The package supports both official Winerr and local installations, allowing you to use Winerr.js with your own builds running on your own devices.
  • Generate fake Windows error windows with customizable text, buttons, and icons.
  • Output images as either base64 strings or buffers.
  • Supports various error window styles, including icons from different Windows versions.

Installation

You can install winerr.js using npm:

npm install winerrjs

Usage

const { Winerr, SystemTypes, ButtonBuilder, ButtonTypes } = require('winerrjs');
const puppeteer = require("puppeteer");

async function generateError() {
    const client = new Winerr({
        "baseURL": "https://shikoshib.ru/tools/winerr", // Defaults to https://shikoshib.ru/tools/winerr if not specified
        "browser": await puppeteer.launch({ headless: true }),
    });

    try {
        const body = {
            "system": "Windows_11", // Specify the system type (Windows 11 in this case)
            "title": "Winerr.js", // Title of the error window
            "text": "Winerr.js is a library for generating error windows in Node.js.", // Error message text
            "icon": 28, // Icon id
            "buttons": [
                new ButtonBuilder().setType(ButtonTypes.DEFAULT).setText("Ok").build(),
                new ButtonBuilder().setType(ButtonTypes.DISABLED).setText("Close").build(),
                new ButtonBuilder().setType(ButtonTypes.RECOMMENDED).setText("Alt + f4").build(),
            ],
            "frameColor": "#000000", // (only for Windows 8.0-8.1)
            "primaryColor": "#FF0000", // (only for Windows 95-2000)
            "secondaryColor": "#00FF00", // (only for Windows 95-2000)
            "cross": false // If true, the cross is inactive,
            "debug": true // Adds *some* logs
        };

        console.log({ ...body, "toBase64": true });
        const errorBase64 = await client.image.create({ ...body, "toBase64": true });

        console.log("Generated error:");
        console.log(errorBase64);

        // Generate the error window as a buffer (if needed for file saving or further processing)
        const errorImage = await client.image.create({ ...body, "toBase64": false });
        
        console.log("Generated error as a buffer:");
        console.log(errorImage);

    } catch (error) {
        console.error("Error generating error window:", error);
    } finally {
        await client.browser.close();
    }
}

generateError();

And we end up with an image like this:

example_error

Saving to file

Also, saving to file was added in 2.4:

> client.image.create({ ...body, "toBase64": false, "path": "./image.png" });
> true

With this code, it returns a Boolean. True if the save is successful, and false if it fails.