canirequire

canirequireCommonJS › proc-log

Is proc-log ESM-only? Can you require() it?

just emit 'log' events on the process object

Last verified Sep 9, 2026 against proc-log@7.0.0. JSON

CommonJS CommonJS — require() works on every Node.js version

proc-log ships CommonJS only. require("proc-log") works everywhere. import "proc-log" 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.

Latest
7.0.0 (May 8, 2026)
Module format
CommonJS
Last CommonJS version
7.0.0
TypeScript types
@types/proc-log
Node engines
^22.22.2 || ^24.15.0 || >=26.0.0
Weekly downloads
52.4M
License
ISC

Does proc-log@7.0.0 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("proc-log") from a CommonJS file and import "proc-log" from an ES module.

Runtimerequire("proc-log")import "proc-log"
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✓ works✓ works

How to import proc-log

ES modules (import)

import procLog from "proc-log";

Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.

CommonJS (require)

const procLog = require("proc-log");

Module format by version

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

VersionsFormatFirst published
1.0.0 – 7.0.0CommonJSApr 15, 2021

Frequently asked

Is proc-log ESM-only?

proc-log@7.0.0 is a CommonJS package. proc-log ships CommonJS only. require("proc-log") works everywhere. import "proc-log" 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 proc-log with ES module syntax?

Yes. import procLog from "proc-log" 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 proc-log work in Bun?

Yes. import "proc-log" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does proc-log ship TypeScript types?

Not bundled. Install the community types with "npm install -D @types/proc-log".

Links

Other commonjs packages

Similar popularity