Package Management
Dependency
What It Is
A package your project requires to work
Analogy
An ingredient your recipe requires — if it's missing, the dish won't work
Try It Out
Dependency Tree
my-project/
├──react@18.2.0
├──loose-envify@1.4.0
└──scheduler@0.23.0
├──next@14.0.0
├──postcss@8.4.31
└──styled-jsx@5.1.1
└──tailwindcss@3.3.5
└──autoprefixer@10.4.16
Each package can have its own dependencies
Related Terms in Package Management
Package
A pre-made sauce you buy instead of making from scratch
npm (Node Package Manager)
A grocery store for JavaScript code — you tell it what you need, it gets it for you
npx
A rental car — use it once without buying it
Installing Globally (-g)
Buying a kitchen appliance for your home vs. renting it for one recipe