fork-ts-checker-notifier-webpack-plugin

raw JSON →
9.0.0 verified Sat Apr 25 auth: no javascript

Webpack plugin that displays system notifications for build status when used with fork-ts-checker-webpack-plugin. v9.0.0 is current, targeting fork-ts-checker-webpack-plugin ^9.0.0 and Node >=16. Releases mirror upstream breaking changes. Similar API to webpack-notifier but specifically for the fork-ts-checker workflow. Silences notifications on successful builds by default, only notifying on first run, failures, and recovery.

error TypeError: Cannot read properties of undefined (reading 'done')
cause ForkTsCheckerNotifierWebpackPlugin placed before ForkTsCheckerWebpackPlugin in plugins array
fix
Reorder plugins: new ForkTsCheckerWebpackPlugin() first, then new ForkTsCheckerNotifierWebpackPlugin().
error Error: Cannot find module 'fork-ts-checker-webpack-plugin'
cause Missing peer dependency fork-ts-checker-webpack-plugin
fix
npm install --save-dev fork-ts-checker-webpack-plugin
error Warning: fork-ts-checker-notifier-webpack-plugin requires a peer of fork-ts-checker-webpack-plugin@^9.0.0 but none was installed
cause Incompatible or missing fork-ts-checker-webpack-plugin version
fix
Install fork-ts-checker-webpack-plugin@^9.0.0
breaking Dropped support for fork-ts-checker-webpack-plugin versions < 9 and Node < 16
fix Upgrade fork-ts-checker-webpack-plugin to ^9.0.0 and ensure Node >=16.
breaking Dropped support for fork-ts-checker-webpack-plugin versions < 8 and Node < 16
fix Upgrade fork-ts-checker-webpack-plugin to ^8.0.0 and Node >=14.
breaking Dropped support for fork-ts-checker-webpack-plugin versions < 7
fix Use fork-ts-checker-webpack-plugin ^7.0.0.
breaking Dropped support for fork-ts-checker-webpack-plugin versions < 6
fix Upgrade fork-ts-checker-webpack-plugin to ^6.0.0.
breaking Upgraded node-notifier to v8.0.2 to fix CVE-2020-7789
fix Ensure node-notifier >=8.0.2 to mitigate the vulnerability.
gotcha Plugin order in webpack config is important; wrong order can cause hooks to be undefined and build failures
fix Always place ForkTsCheckerWebpackPlugin before ForkTsCheckerNotifierWebpackPlugin in the plugins array.
gotcha Package is CommonJS-only; does not support ESM imports
fix Use require() instead of import.
npm install fork-ts-checker-notifier-webpack-plugin
yarn add fork-ts-checker-notifier-webpack-plugin
pnpm add fork-ts-checker-notifier-webpack-plugin

Minimal webpack configuration pairing both plugins; order matters to avoid undefined hooks.

const ForkTsCheckerNotifierWebpackPlugin = require('fork-ts-checker-notifier-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = {
  plugins: [
    new ForkTsCheckerWebpackPlugin(),
    new ForkTsCheckerNotifierWebpackPlugin({ excludeWarnings: true }),
  ],
};