HandbookII the ForumPackages and dependencies
IIthe Forum, The shape of an appPackages and dependencies
In plain words
A package is ready-made code from someone else, installed with npm, and your dependencies are the full list of packages your app needs to run.
Where you see it
The dependencies list in package.json, the enormous node_modules folder you never open, and lines like npm install date-fns scrolling past in your agent's terminal. A fresh Lovable project already has dozens.
What goes wrong
- Installing a package that shouldn't exist
Agents sometimes invent plausible package names, and attackers publish malware under exactly those names. Check the package on npmjs.com before it goes in.
- A new package for a one-line job
Every package is code you now trust and have to keep updated. Check whether something already in package.json does the job.
- Deleting package-lock.json to fix an error
The lock file pins exact versions. Delete it and the next install can pull newer versions that behave differently on your host.
What to tell your agent
Quick check
Sign in to earn +10 XP for itYour agent wants to run npm install react-auth-helpers-pro to fix a login bug. What do you do first?