{"_id":"@nuxtjs/friendly-errors-webpack-plugin","_rev":"67-c331fd71deca322752d886d425822d8e","name":"@nuxtjs/friendly-errors-webpack-plugin","dist-tags":{"latest":"2.1.0"},"versions":{"2.0.0":{"name":"@nuxtjs/friendly-errors-webpack-plugin","version":"2.0.0","keywords":["friendly","errors","webpack","plugin"],"author":{"name":"Geoffroy Warin"},"license":"MIT","_id":"@nuxtjs/friendly-errors-webpack-plugin@2.0.0","maintainers":[{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt/friendly-errors-webpack-plugin#readme","bugs":{"url":"https://github.com/nuxt/friendly-errors-webpack-plugin/issues"},"dist":{"shasum":"70fb321c78362e2b4bce1d522ecdf7f87a4dacec","tarball":"https://registry.npmjs.org/@nuxtjs/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-2.0.0.tgz","fileCount":18,"integrity":"sha512-H/GPDTouTBdf1T8U04xA2UVRUYnt8Pi44FDpRcppQPP1hJXj9wIPwmcPKArvMZkPym1hhTY+gjT5xdz3x4qvcQ==","signatures":[{"sig":"MEUCIQD/vImbMZJdirS8UkBvoQpCWQMNonvLpI9EoWQ3F1uQOgIge9pmhNg5HXq3FAbGdxoohAaE/F3+ouCi0M6JSTLIkIc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26911},"jest":{"testEnvironment":"node"},"main":"index.js","files":["src","index.js"],"engines":{"npm":">=5.0.0","node":">=8.0.0"},"gitHead":"54005fd94392737321dfdc6fd2f404f3677c675c","scripts":{"test":"eslint --ignore-pattern \"test/**\" ./ && jest","release":"standard-version"},"_npmUser":{"name":"clarkdo","email":"clark.duxin@gmail.com"},"repository":{"url":"git+https://github.com/nuxt/friendly-errors-webpack-plugin.git","type":"git"},"_npmVersion":"5.6.0","description":"Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience","directories":{},"_nodeVersion":"9.2.0","dependencies":{"chalk":"^2.3.2","strip-ansi":"^4.0.0","string-width":"^2.0.0","error-stack-parser":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.4.2","eslint":"^4.18.2","expect":"^1.20.2","webpack":"^4.1.1","memory-fs":"^0.4.1","babel-core":"^6.23.1","babel-eslint":"^8.0.0","babel-loader":"^7.1.4","eslint-loader":"^2.0.0","standard-version":"^4.3.0","babel-preset-react":"^6.23.0","babel-plugin-transform-async-to-generator":"^6.22.0"},"peerDependencies":{"webpack":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/friendly-errors-webpack-plugin_2.0.0_1521193840750_0.8540874472180506","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@nuxtjs/friendly-errors-webpack-plugin","version":"2.0.1","keywords":["friendly","errors","webpack","plugin"],"author":{"name":"Geoffroy Warin"},"license":"MIT","_id":"@nuxtjs/friendly-errors-webpack-plugin@2.0.1","maintainers":[{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt/friendly-errors-webpack-plugin#readme","bugs":{"url":"https://github.com/nuxt/friendly-errors-webpack-plugin/issues"},"dist":{"shasum":"ee24107e2cca533e7f245467818abcf5daac527e","tarball":"https://registry.npmjs.org/@nuxtjs/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-2.0.1.tgz","fileCount":18,"integrity":"sha512-AmIEzeuIidT6SYK9K2GrY2kzpSG8kasaPyg0/kNRct1Z+/hWpMpJArVQnaObjQ6jLp5+tUJvZXAk6F65tcxwBw==","signatures":[{"sig":"MEYCIQCTfwp32gxka6bP2CWEYSU/rCr/GiJqeX3PDY3mwxma9QIhAKPt+KF12IDIxI0N/pCEFnOExy8aQh/6t9ma0KZoaX3d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27663},"jest":{"testEnvironment":"node"},"main":"index.js","files":["src","index.js"],"engines":{"npm":">=5.0.0","node":">=8.0.0"},"gitHead":"99df457fc716812ef59c9522ba4e9727667ebd51","scripts":{"test":"eslint --ignore-pattern \"test/**\" ./ && jest","release":"standard-version"},"_npmUser":{"name":"clarkdo","email":"clark.duxin@gmail.com"},"repository":{"url":"git+https://github.com/nuxt/friendly-errors-webpack-plugin.git","type":"git"},"_npmVersion":"5.6.0","description":"Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience","directories":{},"_nodeVersion":"9.2.0","dependencies":{"chalk":"^2.3.2","strip-ansi":"^4.0.0","string-width":"^2.0.0","error-stack-parser":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.4.2","eslint":"^4.18.2","expect":"^1.20.2","webpack":"^4.1.1","memory-fs":"^0.4.1","babel-core":"^6.23.1","babel-eslint":"^8.0.0","babel-loader":"^7.1.4","eslint-loader":"^2.0.0","standard-version":"^4.3.0","babel-preset-react":"^6.23.0","babel-plugin-transform-async-to-generator":"^6.22.0"},"peerDependencies":{"webpack":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/friendly-errors-webpack-plugin_2.0.1_1521529717200_0.41655942934651025","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@nuxtjs/friendly-errors-webpack-plugin","version":"2.0.2","keywords":["friendly","errors","webpack","plugin"],"author":{"name":"Geoffroy Warin"},"license":"MIT","_id":"@nuxtjs/friendly-errors-webpack-plugin@2.0.2","maintainers":[{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt/friendly-errors-webpack-plugin#readme","bugs":{"url":"https://github.com/nuxt/friendly-errors-webpack-plugin/issues"},"dist":{"shasum":"80fd4c4276e87c09a9157a6f433724235eaaaf6e","tarball":"https://registry.npmjs.org/@nuxtjs/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-2.0.2.tgz","fileCount":18,"integrity":"sha512-M/XBdrNKpM9fsGSKCPq981Q+KjvenOql2k+XzBNlaxrBekGJXz3Brz5psYb0TYWawDJCOvPbC4bX428pBST1hw==","signatures":[{"sig":"MEQCIHnhQvhz/YGituVoQ/KVe+GorZOOtwgn7/N5yaRUtCTeAiAvGzfr+d3+j8XLB8Q3oaHu1uhkRsZq2BXBt0mPq3iqBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28070},"jest":{"testEnvironment":"node"},"main":"index.js","files":["src","index.js"],"engines":{"npm":">=5.0.0","node":">=8.0.0"},"gitHead":"bd98f9584bc41b17714342029679ace40a015158","scripts":{"test":"eslint --ignore-pattern \"test/**\" ./ && jest","release":"standard-version"},"_npmUser":{"name":"clarkdo","email":"clark.duxin@gmail.com"},"repository":{"url":"git+https://github.com/nuxt/friendly-errors-webpack-plugin.git","type":"git"},"_npmVersion":"5.6.0","description":"Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience","directories":{},"_nodeVersion":"9.2.0","dependencies":{"chalk":"^2.3.2","strip-ansi":"^4.0.0","string-width":"^2.0.0","error-stack-parser":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.4.2","eslint":"^4.18.2","expect":"^1.20.2","webpack":"^4.1.1","memory-fs":"^0.4.1","babel-core":"^6.23.1","babel-eslint":"^8.0.0","babel-loader":"^7.1.4","eslint-loader":"^2.0.0","standard-version":"^4.3.0","babel-preset-react":"^6.23.0","babel-plugin-transform-async-to-generator":"^6.22.0"},"peerDependencies":{"webpack":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/friendly-errors-webpack-plugin_2.0.2_1521530588012_0.017709722768998626","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@nuxtjs/friendly-errors-webpack-plugin","version":"2.1.0","keywords":["friendly","errors","webpack","plugin"],"author":{"name":"Geoffroy Warin"},"license":"MIT","_id":"@nuxtjs/friendly-errors-webpack-plugin@2.1.0","maintainers":[{"name":"alexchopin","email":"alex@chopin.io"},{"name":"atinux","email":"atinux@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://github.com/nuxt/friendly-errors-webpack-plugin#readme","bugs":{"url":"https://github.com/nuxt/friendly-errors-webpack-plugin/issues"},"dist":{"shasum":"90d0b587b2f118f7f54e3da3d79329ffc72a8578","tarball":"https://registry.npmjs.org/@nuxtjs/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-2.1.0.tgz","fileCount":18,"integrity":"sha512-FI8uTmMeA+xnPIfiLFwq3aZ4PzIdTRN5uw9oa7JHPtB1DM9WgiJeJTBLEzz16yIuDrjRAMOim1BQK3bOOhKANg==","signatures":[{"sig":"MEUCIQD4cndVDAWBtWxWgowLH2e3qk29Wymvsulc4jSeHFps8gIgdh6yMANVCu9mzypcGNXd+RTAbdgw5ujUVlvJ7rAF//8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0zvPCRA9TVsSAnZWagAAUS8P/jt/Yp0G0yGqXoaesZId\n6AL6ArxYDUXTMIiax6dgFyc/ElBxL0XGJAAf8zo+jA+MUC6i7La4ANr5s9co\nuzJFA/B/GH/IvCrRv+/u8+pN/q8DrDlHTI3a1rOZGHaxYiPG3MkMNjXaizYy\nsu23a4B73o9oCeCUabJFHqKpgE/7TQE4k13uBH6u2sRWdObvibHpyGmftN+t\n4CRa/u94lh73QsSamCcUb0XZzgtyS2sKVLxAAxgwguTKoiLiBmG9kxYSSt1Z\nKkoYeqBpTxSR/tgGfMRphZr+AlDqwCcIsmka98fNCEuL5lVjRAJUBNUccIZd\nE2zp7jad2bfSHsCKKXKJhZLraXOdkvjpx0xi0YT89Eo63vi5z+7mgVDrWjbF\nYl1PQMznwVFCi5xn76aEJYjAxNURvNTesmuygPub7vKIcxkBtRyuGNyO9EzR\nEpTd+EiUBKyiGIcraOp96+bzobyGdensu2WonGLGxPGl83Y/dYbK7Mp1BJlt\nzXQ8Z4w9OYDA1p7ERyeorqsjJJI/gn+0N3j1uD1twdalnqjyeZF17ac/w4hd\nm+TTSqaoNqbLE3q4ezWhnzi3g75oXPcnyEtJssV3bqIhAvJBrr4SkHL8qLuT\nktty7yAGXdP73vzpPxVJSsOUR4oMRxNIbUUVXjS3UoPOoRBi4JjQ/NRquq6v\nRUL7\r\n=Pbgf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"testEnvironment":"node"},"main":"index.js","engines":{"npm":">=5.0.0","node":">=8.0.0"},"gitHead":"207c118c59deccaf07e6933194b36076bb4767fc","scripts":{"test":"eslint --ignore-pattern test/* && jest","release":"standard-version"},"_npmUser":{"name":"clarkdo","email":"clark.duxin@gmail.com"},"repository":{"url":"git+https://github.com/nuxt/friendly-errors-webpack-plugin.git","type":"git"},"_npmVersion":"6.4.1","description":"Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience","directories":{},"_nodeVersion":"10.11.0","dependencies":{"chalk":"^2.3.2","strip-ansi":"^4.0.0","string-width":"^2.0.0","error-stack-parser":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^22.4.2","eslint":"^4.18.2","expect":"^1.20.2","webpack":"^4.1.1","memory-fs":"^0.4.1","babel-core":"^6.23.1","babel-eslint":"^8.0.0","babel-loader":"^7.1.4","eslint-loader":"^2.0.0","standard-version":"^4.3.0","babel-preset-react":"^6.23.0","babel-plugin-transform-async-to-generator":"^6.22.0"},"peerDependencies":{"webpack":"^2.0.0 || ^3.0.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/friendly-errors-webpack-plugin_2.1.0_1540570063089_0.17206315464920952","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-03-16T09:50:40.637Z","modified":"2026-08-19T11:55:58.537Z","2.0.0":"2018-03-16T09:50:40.959Z","2.0.1":"2018-03-20T07:08:37.285Z","2.0.2":"2018-03-20T07:23:08.113Z","2.1.0":"2018-10-26T16:07:43.261Z"},"bugs":{"url":"https://github.com/nuxt/friendly-errors-webpack-plugin/issues"},"author":{"name":"Geoffroy Warin"},"license":"MIT","homepage":"https://github.com/nuxt/friendly-errors-webpack-plugin#readme","keywords":["friendly","errors","webpack","plugin"],"repository":{"url":"git+https://github.com/nuxt/friendly-errors-webpack-plugin.git","type":"git"},"description":"Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience","maintainers":[{"email":"pyapar@gmail.com","name":"pi0"},{"email":"atinux@gmail.com","name":"atinux"},{"email":"daniel@roe.dev","name":"danielroe"},{"email":"anthonyfu117@hotmail.com","name":"antfu"}],"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 @nuxtjs/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('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 additionnal notes to be displayed unpon 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 'warning'\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  // 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('friendly-errors-webpack-plugin');\nvar notifier = require('node-notifier');\nvar ICON = path.join(__dirname, 'icon.png');\n\nnew NotifierPlugin({\n    onErrors: (severity, errors) => {\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","readmeFilename":"README.md"}