{"id":14964148,"url":"https://github.com/nuxt/friendly-errors-webpack-plugin","last_synced_at":"2025-09-30T19:30:56.068Z","repository":{"id":30779256,"uuid":"125474420","full_name":"nuxt/friendly-errors-webpack-plugin","owner":"nuxt","description":"Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience.","archived":false,"fork":true,"pushed_at":"2024-06-05T05:37:27.000Z","size":779,"stargazers_count":29,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-17T17:25:46.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"geowarin/friendly-errors-webpack-plugin","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuxt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-16T06:37:46.000Z","updated_at":"2025-04-04T04:28:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nuxt/friendly-errors-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/nuxt/friendly-errors-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt%2Ffriendly-errors-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt%2Ffriendly-errors-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt%2Ffriendly-errors-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt%2Ffriendly-errors-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuxt","download_url":"https://codeload.github.com/nuxt/friendly-errors-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt%2Ffriendly-errors-webpack-plugin/sbom","scorecard":{"id":699150,"data":{"date":"2025-08-11","repo":{"name":"github.com/nuxt/friendly-errors-webpack-plugin","commit":"1078b16eb02043bb1d32f30af500fda301c1ad05"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":1,"reason":"Found 5/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/nuxt/.github/SECURITY.md:1","Info: Found linked content: github.com/nuxt/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/nuxt/.github/SECURITY.md:1","Info: Found text in security policy: github.com/nuxt/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-7xcx-6wjh-7xp2","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T04:42:05.835Z","repository_id":30779256,"created_at":"2025-08-22T04:42:05.835Z","updated_at":"2025-08-22T04:42:05.835Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277746958,"owners_count":25870057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:32:38.357Z","updated_at":"2025-09-30T19:30:55.644Z","avatar_url":"https://github.com/nuxt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Friendly-errors-webpack-plugin\n\n[![npm](https://img.shields.io/npm/v/@nuxtjs/friendly-errors-webpack-plugin.svg)](https://www.npmjs.com/package/@nuxtjs/friendly-errors-webpack-plugin)\n[![Build Status](https://travis-ci.org/nuxt/friendly-errors-webpack-plugin.svg?branch=master)](https://travis-ci.org/nuxt/friendly-errors-webpack-plugin)\n[![Build status](https://ci.appveyor.com/api/projects/status/hqi9g8u2e17epr2d?svg=true)](https://ci.appveyor.com/project/nuxt/friendly-errors-webpack-plugin/branch/master)\n\nFriendly-errors-webpack-plugin recognizes certain classes of webpack\nerrors and cleans, aggregates and prioritizes them to provide a better\nDeveloper Experience.\n\nIt is easy to add types of errors so if you would like to see more\nerrors get handled, please open a [PR](https://help.github.com/articles/creating-a-pull-request/)!\n\n## Getting started\n\n### Installation\n\n```bash\nnpm install @nuxt/friendly-errors-webpack-plugin --save-dev\n```\n\n### Basic usage\n\nSimply add `FriendlyErrorsWebpackPlugin` to the plugin section in your Webpack config.\n\n```javascript\nvar FriendlyErrorsWebpackPlugin = require('@nuxt/friendly-errors-webpack-plugin');\n\nvar webpackConfig = {\n  // ...\n  plugins: [\n    new FriendlyErrorsWebpackPlugin(),\n  ],\n  // ...\n}\n```\n\n### Turn off errors\n\nYou need to turn off all error logging by setting your webpack config quiet option to true.\n\n```javascript\napp.use(require('webpack-dev-middleware')(compiler, {\n  // ...\n  logLevel: 'SILENT',\n  // ...\n}));\n```\n\nIf you use the webpack-dev-server, there is a setting in webpack's ```devServer``` options:\n\n```javascript\n// webpack config root\n{\n  // ...\n  devServer: {\n    // ...\n    quiet: true,\n    // ...\n  },\n  // ...\n}\n```\n\nIf you use webpack-hot-middleware, that is done by setting the log option to `false`. You can do something sort of like this, depending upon your setup:\n\n```javascript\napp.use(require('webpack-hot-middleware')(compiler, {\n  log: false\n}));\n```\n\n_Thanks to [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard) for this piece of info._\n\n## Demo\n\n### Build success\n\n![success](http://i.imgur.com/MkUEhYz.gif)\n\n### eslint-loader errors\n\n![lint](http://i.imgur.com/xYRkldr.gif)\n\n### babel-loader syntax errors\n\n![babel](http://i.imgur.com/W59z8WF.gif)\n\n### Module not found\n\n![babel](http://i.imgur.com/OivW4As.gif)\n\n## Options\n\nYou can pass options to the plugin:\n\n```js\nnew FriendlyErrorsPlugin({\n  compilationSuccessInfo: {\n    messages: ['You application is running here http://localhost:3000'],\n    notes: ['Some additional notes to be displayed upon successful compilation']\n  },\n  onErrors: function (severity, errors) {\n    // You can listen to errors transformed and prioritized by the plugin\n    // severity can be 'error' or 'warn'\n  },\n  // should the console be cleared between each compilation?\n  // default is true\n  clearConsole: true,\n\n  // INFO:    all logs\n  // WARNING: warnings and errors\n  // ERROR:   only errors\n  // SILENT:  no log\n  logLevel: true,\n\n  // base: default\n  // consola: consola adapter\n  // can also be npm package name or reporter object\n  reporter: 'consola'\n\n  // add formatters and transformers (see below)\n  additionalFormatters: [],\n  additionalTransformers: []\n})\n```\n\n## Adding desktop notifications\n\nThe plugin has no native support for desktop notifications but it is easy\nto add them thanks to [node-notifier](https://www.npmjs.com/package/node-notifier) for instance.\n\n```js\nvar NotifierPlugin = require('@nuxt/friendly-errors-webpack-plugin');\nvar notifier = require('node-notifier');\nvar ICON = path.join(__dirname, 'icon.png');\n\nnew NotifierPlugin({\n    onErrors: (severity, errors) =\u003e {\n      if (severity !== 'error') {\n        return;\n      }\n      const error = errors[0];\n      notifier.notify({\n        title: \"Webpack error\",\n        message: severity + ': ' + error.name,\n        subtitle: error.file || '',\n        icon: ICON\n      });\n    }\n  })\n]\n```\n\n## API\n\n### Transformers and formatters\n\nWebpack's errors processing, is done in four phases:\n\n1. Extract relevant info from webpack errors. This is done by the plugin [here](https://github.com/nuxt/friendly-errors-webpack-plugin/blob/master/src/core/extractWebpackError.js)\n2. Apply transformers to all errors to identify and annotate well know errors and give them a priority\n3. Get only top priority error or top priority warnings if no errors are thrown\n4. Apply formatters to all annotated errors\n\nYou can add transformers and formatters. Please see [transformErrors](https://github.com/nuxt/friendly-errors-webpack-plugin/blob/master/src/core/transformErrors.js),\nand [formatErrors](https://github.com/nuxt/friendly-errors-webpack-plugin/blob/master/src/core/formatErrors.js)\nin the source code and take a look a the [default transformers](https://github.com/nuxt/friendly-errors-webpack-plugin/tree/master/src/transformers)\nand the [default formatters](https://github.com/nuxt/friendly-errors-webpack-plugin/tree/master/src/formatters).\n\n### Customize Reporters\n\nReporter is a class for generating output of errors messages, structure is:\n\n1. Include following levels log methods: `success`, `info`, `note`, `warn`, `error`.\n1. Include method `clearConsole` for clearing the terminal console.\n\nYou can take a look at source code as example [base reporter](https://github.com/nuxt/friendly-errors-webpack-plugin/blob/master/src/reporters/base.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt%2Ffriendly-errors-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuxt%2Ffriendly-errors-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt%2Ffriendly-errors-webpack-plugin/lists"}