Registry / web-framework / bell-on-bundler-error-plugin

bell-on-bundler-error-plugin

JSON →
library3.0.0jsnpmunverified

The `bell-on-bundler-error-plugin` package provides a minimalist Webpack plugin designed to alert developers to build errors by writing a bell character (ASCII `\u0007`) to STDERR output. This mechanism allows for audible or visual terminal notifications when a Webpack build fails, without relying on external services or complex configurations. The package is currently at version 3.0.0. Given its last significant code updates date back several years (copyright 2015-2016, with GitHub showing its last actual commit around 4 years ago as of April 2025), it exists within an ecosystem that has seen considerable evolution, particularly with Webpack's major versions 4 and 5 introducing significant changes to plugin APIs. Its core differentiator is its simple, terminal-centric approach to error notification. However, due to its age and lack of recent maintenance, it may not be compatible with modern Webpack versions (v5+) or their associated plugin ecosystems, effectively rendering it abandoned for current projects.

npm install bell-on-bundler-error-plugin
INSTALL
IMPORT
SIG · BELL-ON-BUNDLER-ER
B
bell-on-bundler-error-plugin
web-frameworkjavascriptv3.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BellOnBundlerErrorPlugin
const BellOnBundlerErrorPlugin = require('bell-on-bundler-error-plugin');
import BellOnBundlerErrorPlugin from 'bell-on-bundler-error-plugin';
This package is a CommonJS module and must be imported using `require()` in Node.js environments, including Webpack configuration files. Direct ESM `import` statements will fail unless your bundler is configured to handle CJS modules.

This quickstart demonstrates how to integrate `BellOnBundlerErrorPlugin` into a Webpack configuration. It includes a deliberate error to show the plugin's effect when a build fails, causing a bell character to be written to STDERR.

const path = require('path'); const BellOnBundlerErrorPlugin = require('bell-on-bundler-error-plugin'); module.exports = { mode: 'development', entry: './src/index.js', output: { filename: 'bundle.js', path: path.resolve(__dirname, 'dist'), }, plugins: [ // Instantiate the plugin without any options for default behavior new BellOnBundlerErrorPlugin() ], // Simulate an error to trigger the bell sound module: { rules: [ { test: /\.js$/, exclude: /node_modules/, // Use a non-existent loader to force a compilation error use: ['non-existent-loader'], }, ], }, // Minimal Webpack configuration to demonstrate the plugin // Run with `npx webpack` and listen for the bell character on error. };
Debug
Known issues
breakingThis plugin was likely developed for older Webpack versions (e.g., v3 or v4). Webpack 5, released in late 2020, introduced significant changes to the plugin API (e.g., how plugins access `webpack` exports and asset objects), rendering many older plugins incompatible. Using `bell-on-bundler-error-plugin` with Webpack 5+ will likely result in build failures or incorrect behavior.
fix
Upgrade to a maintained Webpack error notification plugin, or if Webpack 4 is acceptable for your project, use a compatible version. If you must use Webpack 5+, consider forking and updating the plugin, or implementing a custom plugin that adheres to the Webpack 5 plugin API.
affects: >=5.0.0 (Webpack)
gotchaThe project appears to be unmaintained, with its last significant code updates dating back several years (copyright 2015-2016, last commit ~4 years ago as of April 2025). This means it's unlikely to receive updates for new Webpack versions, bug fixes, or security patches, potentially leading to compatibility issues or unaddressed vulnerabilities in modern development environments.
fix
Evaluate if the benefits outweigh the risks of using an unmaintained dependency. Consider migrating to a more actively developed alternative for error notifications or creating a custom, lightweight solution.
affects: >=3.0.0
gotchaThis plugin is published as a CommonJS module, meaning it can only be imported using Node.js's `require()` syntax. It does not provide ESM exports (`import`). While Webpack configurations often use CommonJS, attempting to `import` it in an ESM context will fail without specific bundler configuration or transpilation.
fix
Always use `const BellOnBundlerErrorPlugin = require('bell-on-bundler-error-plugin');` in your Webpack configuration file. If your configuration file is an ES module (e.g., `webpack.config.mjs` or `type: 'module'` in `package.json`), you might need to use a dynamic `import()` or wrap your configuration in a CommonJS context.
affects: >=3.0.0
gotchaThe plugin's sole notification method is a bell character to STDERR. In modern development setups with rich notification systems (e.g., OS-level notifications, browser extensions, dedicated build tools like Webpack Dashboard), this may be insufficient or go unnoticed by developers, especially in silent terminals or CI/CD environments.
fix
If more robust or visually prominent notifications are desired, consider integrating a more advanced Webpack plugin that supports desktop notifications (e.g., `webpack-notifier`), browser notifications, or integrates with build reporting dashboards.
affects: >=3.0.0
Errors
Common errors & fixes
TypeError: BellOnBundlerErrorPlugin is not a constructor
Attempting to call `BellOnBundlerErrorPlugin()` without the `new` keyword, or incorrect import for a CommonJS module in an ESM context.
fix
Ensure `new BellOnBundlerErrorPlugin()` is used when instantiating the plugin in your Webpack configuration. If your Webpack config file uses ES Modules, ensure you're correctly handling the CommonJS import, typically by sticking to `require()` for this plugin.
ERROR in [plugin-name]: unable to delete '...' File does not exist.
This error message (or similar variations) is common when older Webpack plugins, designed for Webpack 4's asset handling, are used with Webpack 5. Webpack 5 introduced `SizeOnlySource` asset objects and removed certain options like `output.futureEmitAssets`, which older plugins might rely on.
fix
This plugin is likely incompatible with Webpack 5+. Downgrade your Webpack version to 4 or earlier to maintain compatibility with this plugin. Alternatively, migrate to a different, actively maintained plugin that is compatible with Webpack 5 for error notifications.
ReferenceError: require is not defined in ES module scope
Attempting to use `require()` in a JavaScript file that is treated as an ES module (e.g., a `.mjs` file or a `.js` file in a project with `"type": "module"` in `package.json`), where `require` is not globally available.
fix
Ensure your Webpack configuration file (e.g., `webpack.config.js`) is treated as a CommonJS module. If your project uses ES Modules by default, you might need to explicitly configure Webpack to process its config file as CommonJS, or use a dynamic `import()` statement for the plugin if absolutely necessary, though sticking to CommonJS for config files is often simpler for older plugins.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies
webpackrequiredThis is a webpack plugin and requires webpack as a peer dependency for compilation lifecycle hooks. It is likely only compatible with older versions of webpack (e.g., v3 or v4, possibly v2).
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
bell-on-bundler-error-plugin — npm install bell-on-bundler-error-plugin · libregistry