C.W.K.
Stream
Quiz · 5 questions

📦 The Module System

CJS, ESM, package.json, semver, and the npm/pnpm/bun ecosystem

Level 0Node Curious
0 XP0/40 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Quiz

01A .js file with no package.json nearby — how does Node decide whether to load it as CJS or ESM?
02What does the package.json exports field do that main doesn't?
03Your dependency is listed as "react": "^19.2.0". Which of these is npm update allowed to install?
04Why does pnpm use a content-addressable store and symlinks instead of npm's flat-hoisted node_modules?
05You're building a React component library. Where does react belong in your package.json?
Hint
Think about what happens if both your library and the consuming app each install React separately. Two copies, two useState functions, two registries of hook state — they don't talk to each other.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.