Node Module Format Errors

Untangle ESM and CommonJS failures in Node and bundled projects. Establish three facts before touching config (which loader resolves the file, the module type from package.json type or the .mjs and .cjs extension, and which exports condition your import selects), check the Node version because require of synchronous ESM works unflagged from 22.12, run publint and @arethetypeswrong/cli on npm pack output for a library you publish, and match TypeScript module and moduleResolution to the runtime. Use whenever "ERR_REQUIRE_ESM", "Cannot use import statement outside a module", "does not provide an export named", "ERR_PACKAGE_PATH_NOT_EXPORTED", "types resolve but the runtime import fails", or "how do I publish a dual package". Not for planned version moves (dependency-upgrade), the installer refusing a tree (dependency-resolution-conflict), or compiler speed (slow-build-profile).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 2db6c080c0

Frequently asked questions

npx get-skill add greenblacked/node-module-format-errors