🟢 Node.js
Beginner
What is package.json?
Answer
package.json is the manifest file for a Node.js project. It is a JSON file that records important metadata about your project and manages its dependencies. Key fields include: name and version (required for published packages), description, main (entry point file), scripts (custom commands like "start": "node index.js"), dependencies (packages required in production), devDependencies (packages only needed during development like testing tools), peerDependencies (packages the consumer must install), engines (required Node.js version), and license. The scripts field is particularly useful for defining build, test, and start commands. Generate it with npm init (interactive) or npm init -y (defaults).