rollup-plugin-notify

raw JSON →
1.1.0 verified Mon Apr 27 auth: no javascript maintenance

A Rollup plugin that displays build errors as native OS system notifications. Version 1.1.0 is the latest stable release; the package is in maintenance mode with no active development. It requires Rollup >=0.60.0 and depends on node-notifier internally. Unlike build logs, this plugin allows developers working in watch mode to see errors immediately without switching terminal windows. It extracts file, code snippet, and position from Rollup errors (including Babel) and formats them into concise 4-line notifications.

error Error: Cannot find module 'node-notifier'
cause node-notifier is a dependency of rollup-plugin-notify, but sometimes not installed correctly.
fix
Run 'npm install' in your project root; if problem persists, add node-notifier explicitly: npm install --save-dev node-notifier
error TypeError: notify is not a function
cause Importing the package incorrectly (named import instead of default).
fix
Change to: import notify from 'rollup-plugin-notify' (or const notify = require('rollup-plugin-notify').default)
error Error: Rollup version mismatch. rollup-plugin-notify requires rollup ^1.4.1
cause Installed Rollup version is incompatible.
fix
Downgrade Rollup to version 1.x, or use an alternative plugin.
deprecated Peer dependency rollup@^1.4.1, but Rollup is now at v4. The plugin may not work correctly with newer versions.
fix Consider using a more up-to-date notification plugin or fork.
gotcha Notifications only appear on build errors, not warnings or info messages.
fix Use other Rollup plugins for warning/log notifications.
gotcha On some Linux desktop environments, notifications may not work or require additional configuration of node-notifier.
fix Check node-notifier documentation for Linux support.
npm install rollup-plugin-notify
yarn add rollup-plugin-notify
pnpm add rollup-plugin-notify

Basic Rollup configuration to show OS notifications on build errors.

// rollup.config.js
import notify from 'rollup-plugin-notify';

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.js',
    format: 'iife'
  },
  plugins: [
    notify()
  ]
};