Duolith docs

Errors E0200 to E0299

E0286 Package uses a Node global

Message package uses the Node global global

Words in italics are filled in when the compiler reports it, such as the element's name or the list of known ones.

Why

duolith scan found Node's process, Buffer, __dirname or __filename used as a global. None of the app's targets has them. process.env.NODE_ENV is allowed, since every bundler replaces it.

How to fix it

Use a package written for browsers and apps instead, or an alternative such as Uint8Array for Buffer.

In a terminal

duolith explain E0286

Mentioned in