Node.js · Modules · Junior · Debugging
What is the dual package hazard?
Short Interview Answer
Shipping both CJS and ESM that evaluate twice, breaking singleton identity (two copies of a module).
Detailed Explanation
Careful package.json exports and documentation matter. Consumers importing differently can get two React/Nest instances — subtle bugs.
Common Mistake
Publishing broken conditional exports.