package.json Playground

The order slip on the workshop bench: ban-dodi’s package.json and who reads which line. This page’s own JSON.parse, exports and main as Node 22 looks them up…

Why it matters

Many "works on my laptop, breaks once installed" errors come from package.json: one comma, an exports missing a path, a type that takes require away, a dist left behind at publish time. Knowing who reads which line makes those errors readable.

The key idea

package.json has many readers, each reading its own part

Common mistakes

Try it in this playground