# Is friendly-errors-webpack-plugin ESM-only? Can you require() it?

> friendly-errors-webpack-plugin@1.7.0 is a CommonJS package. CommonJS — require() works on every Node.js version we test.

Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience

Last verified Sep 9, 2026 against friendly-errors-webpack-plugin@1.7.0.

friendly-errors-webpack-plugin ships CommonJS only. require("friendly-errors-webpack-plugin") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "friendly-errors-webpack-plugin" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

**Deprecated:** Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

## What to do

1. require("friendly-errors-webpack-plugin") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun.
2. From ES modules use the default import: import friendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin"; then destructure. Named imports only work when Node.js can statically detect the exports.
3. TypeScript: npm install -D @types/friendly-errors-webpack-plugin
4. This package is deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

## Facts

- Latest: 1.7.0 (Apr 5, 2018)
- Module format: CommonJS
- Last CommonJS version: 1.7.0
- TypeScript types: @types/friendly-errors-webpack-plugin
- Node engines: not declared
- Weekly downloads: 204K
- License: MIT

## Runtime test results for friendly-errors-webpack-plugin@1.7.0

Installed and executed on Sep 9, 2026 with require("friendly-errors-webpack-plugin") from a CommonJS file and import "friendly-errors-webpack-plugin" from an ES module.

| Runtime | require("friendly-errors-webpack-plugin") | import "friendly-errors-webpack-plugin" |
|---|---|---|
| Node.js 18 | works | works |
| Node.js 20 | works | works |
| Node.js 22 | works | works |
| Node.js 24 | works | works |
| Node.js 26 | works | works |
| Bun 1.4.0 | works | works |

## How to import friendly-errors-webpack-plugin

ES modules:

```js
import friendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin";
```

CommonJS:

```js
const friendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (16 versions; the newest 16 shown).

| Versions | Format | First published |
|---|---|---|
| 1.0.0 – 1.7.0 | CommonJS | Aug 26, 2016 |

## Frequently asked

**Is friendly-errors-webpack-plugin ESM-only?**

friendly-errors-webpack-plugin@1.7.0 is a CommonJS package. friendly-errors-webpack-plugin ships CommonJS only. require("friendly-errors-webpack-plugin") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "friendly-errors-webpack-plugin" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

**Can I import friendly-errors-webpack-plugin with ES module syntax?**

Yes. import friendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

**Does friendly-errors-webpack-plugin work in Bun?**

Yes. import "friendly-errors-webpack-plugin" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does friendly-errors-webpack-plugin ship TypeScript types?**

Not bundled. Install the community types with "npm install -D @types/friendly-errors-webpack-plugin".

## Links

- [friendly-errors-webpack-plugin on npm](https://www.npmjs.com/package/friendly-errors-webpack-plugin)
- [Source repository](https://github.com/geowarin/friendly-errors-webpack-plugin)
- [HTML version](https://canirequire.com/package/friendly-errors-webpack-plugin/)
- [JSON version](https://canirequire.com/package/friendly-errors-webpack-plugin.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
