How to Initiate a Node.js Project
Before running npm install in a brand-new project folder, you need to initialize it first. Run npm init -y to generate a default package.json file - without it, npm has nowhere to record your dependencies.
Related snippets
- npm init -y
- Creates a package.json with default values, skipping the interactive prompts, so npm has a place to track your project's dependencies.