{"id":25310,"library":"esbuild-os-notifier","title":"esbuild OS Notifier Plugin","description":"esbuild-os-notifier (v1.1.1) is a plugin for esbuild that triggers native OS notifications when builds finish, error, or warn. It wraps node-notifier to support macOS, Windows, and Linux. Allows customization of notification content, sound, timeout, and selective enabling of success/error/warning alerts. Currently stable with monthly releases. Differentiators: minimal config, built-in TypeScript types, and simple API compared to alternatives like esbuild-plugin-notify.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":"https://danielperez9430@github.com/danielperez9430/esbuild-os-notifier","tags":["javascript","esbuild","plugin","os","notification","typescript"],"install":[{"cmd":"npm install esbuild-os-notifier","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-os-notifier","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-os-notifier","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"underlying notification library","package":"node-notifier","optional":false},{"reason":"peer dependency for plugin usage","package":"esbuild","optional":false}],"imports":[{"note":"Default export, not named. CommonJS require works as shown.","wrong":"import { esbuildOsNotifier } from 'esbuild-os-notifier'","symbol":"default","correct":"import esbuildOsNotifier from 'esbuild-os-notifier'"},{"note":"CommonJS usage. Returns the default export.","wrong":null,"symbol":"default (require)","correct":"const esbuildOsNotifier = require('esbuild-os-notifier')"},{"note":"Type is exported for TypeScript usage with import type.","wrong":"import { EsbuildOsNotifierOptions } from 'esbuild-os-notifier'","symbol":"esbuildOsNotifier (type)","correct":"import type { EsbuildOsNotifierOptions } from 'esbuild-os-notifier'"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport esbuildOsNotifier from 'esbuild-os-notifier';\n\nbuild({\n  entryPoints: ['src/index.js'],\n  outfile: 'dist/index.js',\n  bundle: true,\n  plugins: [esbuildOsNotifier()],\n}).catch(() => process.exit(1));","lang":"typescript","description":"Initializes esbuild with the OS notifier plugin, triggering a desktop notification on build completion or failure."},"warnings":[{"fix":"Use separate esbuild hooks if you need result handling.","message":"The plugin does not forward esbuild's result object; you cannot access build results inside the notification callback.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pin node-notifier to v9 if needed, or test on your target systems.","message":"node-notifier v10+ removed support for some Linux notification backends; upgrades may break on older Linux distributions.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use the correct signature: esbuildOsNotifier(notificationOptions, eventOptions).","message":"Passing options incorrectly (e.g., nested object order) can cause TypeScript errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap plugin conditionally with an environment check.","message":"The plugin does not work in non-interactive environments (e.g., CI) where desktop notifications are absent.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use default import: import esbuildOsNotifier from 'esbuild-os-notifier'","cause":"Importing named export instead of default.","error":"TypeError: esbuildOsNotifier is not a function"},{"fix":"Install it: npm install node-notifier","cause":"Missing peer dependency node-notifier.","error":"Cannot find module 'node-notifier'"},{"fix":"Use import esbuildOsNotifier from 'esbuild-os-notifier'","cause":"Trying to import as named export instead of default.","error":"error TS2339: Property 'esbuildOsNotifier' does not exist on type 'typeof import(...)'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}