~/talk

Arborist module: How npm install REALLY works

Talkat NodeTLV 2023 · on Wednesday, 2023-06-28· [nodejs, javascript]
links:none on file
slides:none on file

Explains exactly what npm does when running npm install: Arborist analyzes the project, builds an actual tree and an ideal tree, then plans and executes filesystem changes with fully atomic rollback support. Shows why npm 7 auto-installing peer deps (vs npm 6) creates version collisions with a concrete eslint vs Vue CLI example, and demonstrates Node’s module resolution rule of searching node_modules upward through parent folders. Includes the five-step Arborist pipeline and the practical fix: upgrade the peer or downgrade the installed package to resolve the conflict.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:04Personal story and motivation
  3. 3:32Root cause analysis with Five Whys
  4. 4:16Understanding npm error arrows
  5. 6:01Types of npm dependencies
  6. 7:27Peer dependencies in npm 6 vs 7
  7. 8:52Dependency conflicts explained
  8. 10:19Dependency graph vs dependency tree
  9. 11:24Scale of npm ecosystem
  10. 12:49Node module resolution process
  11. 13:51Node module isolation in file system
  12. 15:13Introducing Arborist model
  13. 15:55How Arborist manages dependencies
  14. 17:40Arborist execution and rollback
  15. 19:05Solving the npm error
  16. 19:49Summary and key takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.