Section 04
Set Up Your Stack
Install and configure everything you need: Node.js, Git, VSCode, Claude Code, GitHub, and Vercel. Tabs for every OS.
This section uses OS tabs throughout. Pick your platform once and follow the instructions for it. If you're on Windows, consider also setting up WSL2 (Windows Subsystem for Linux), which makes everything smoother. There's a step for that at the end.
I'm setting up a development environment for the first time. I need to install Node.js, Git, VSCode, and some CLI tools. Can you explain what each of these things is, why I need it, and how they work together? I want to understand the "why" before I run any commands.
π Copy this prompt and paste it into Claude, ChatGPT, or Gemini β it will explain everything in as much detail as you want.
Install Node.js (via nvm)
Node.js lets you run JavaScript outside the browser. You need it for the npm package manager, which is how you install Claude Code, Next.js, and almost everything else in the modern web dev stack.
The easiest way on macOS is via Homebrew, the de-facto package manager for the Mac.
1. Install Homebrew (if you don't have it):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"2. Install Node.js via nvm (Node Version Manager):
brew install nvm
mkdir ~/.nvm
# Add to ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"
# Reload shell, then:
nvm install --lts
nvm use --lts3. Verify:
node --version # should print v20.x or higher
npm --versionAlways install Node via nvm rather than directly. It lets you switch versions per project and avoids permission headaches.
Install and Configure Git
Git is version control. It tracks every change to your code, lets you revert mistakes, and connects to GitHub so you can collaborate and deploy.
macOS ships with a (usually outdated) git. Get the latest via Homebrew:
brew install git
git --version # should print 2.40+
# Configure your identity (required for commits)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"Set your name and email before making any commits, as they get embedded in every commit you make.
Explain Git to a complete beginner. What problem does it solve? What are commits, branches, and merges? What's the difference between git and GitHub? Walk me through the basic daily workflow: staging changes, committing, pushing to GitHub.
π Copy this prompt and paste it into Claude, ChatGPT, or Gemini β it will explain everything in as much detail as you want.
Install VSCode
Visual Studio Code is a free, open-source code editor built by Microsoft. It's the most popular editor in the world for web development: fast, extensible, and works great with all the other tools in this stack.
Download from code.visualstudio.com and drag to Applications. Then enable the terminal command:
- Open VSCode
- Press β + Shift + P
- Type
Shell Command: Install 'code' command in PATH - Hit Enter
code . # open current folder
code ~/projects/my-appRecommended Extensions
Open VSCode, press β/Ctrl + Shift + X, and install:
The first extensions you should install: ESLint, Prettier, and GitLens.
Install Claude Code
Claude Code is an AI coding agent that lives in your terminal. It can read your files, edit code, run commands, and work through multi-step tasks, all from natural language instructions.
npm install -g @anthropic-ai/claude-code
claude --versionThen start it in any project folder:
cd ~/projects/my-app
claudeOn first launch it will ask you to log in with your Anthropic account or API key.
Key commands to know
claudeStart Claude Code in the current directory/helpShow all slash commands/clearClear conversation context/memoryView and edit Claude's memoryEscapeCancel current actionCtrl+C twiceExit Claude CodeYou need an Anthropic account (claude.ai) to use Claude Code. The free tier has limits; Pro ($20/mo) gives you much more capacity.
π° What does this cost?
- claude.ai Pro ($20/mo): Includes Claude Code usage. This is the easiest way to get started.
- API (pay-as-you-go): ~$0.003 per 1,000 input tokens for Sonnet (fractions of a cent per message). A typical coding session costs $0.10β$1.
- Free tier: claude.ai has a free tier with daily limits, fine for learning, limited for heavy use.
You won't accidentally run up a large bill doing this guide. The API has spend limits you can set in your Anthropic dashboard.
I just installed Claude Code. What are the most important things I should know in the first week? What are the best prompts to start with? How do I give it context about my project? What are common mistakes new users make? Give me a "first week with Claude Code" guide.
π Copy this prompt and paste it into Claude, ChatGPT, or Gemini β it will explain everything in as much detail as you want.
Set Up GitHub
GitHub is where your code lives in the cloud. It's also how Vercel deploys your site: push to GitHub, Vercel automatically rebuilds and deploys.
First, create a free account at github.com.
brew install gh
gh auth login # follow prompts to authenticate via browserSet up SSH keys (recommended over HTTPS):
ssh-keygen -t ed25519 -C "you@example.com"
cat ~/.ssh/id_ed25519.pub # copy this output
# Then go to github.com β Settings β SSH Keys β New SSH Key β pasteUse SSH keys rather than passwords. Once set up, you'll never need to type credentials again.
Set Up Vercel
Vercel is a hosting platform built for the modern web. It connects to your GitHub repo and automatically deploys every time you push code.
Create a free account at vercel.com, then install the CLI:
npm install -g vercel
vercel login # opens browser to authenticatecd my-project
vercel # first time: follow prompts to link project
vercel --prod # deploy to productionVercel's free tier (Hobby) is generous enough for personal projects and learning. You don't need a credit card.
Windows Bonus: Set Up WSL2
WSL2 (Windows Subsystem for Linux) lets you run a real Linux environment inside Windows. Many dev tools work better on Linux, and WSL2 gives you that without leaving Windows.
# Run in PowerShell as Administrator
wsl --install
# Restart your computer, then set up your Linux username/password
# After restart, open "Ubuntu" from Start menu
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install --ltsExplain how VSCode, Git, GitHub, and Vercel all work together in a modern web development workflow. What happens step by step when I write code, save it, push it to GitHub, and it deploys on Vercel? What is CI/CD and how does Vercel's automatic deployment relate to that concept?
π Copy this prompt and paste it into Claude, ChatGPT, or Gemini β it will explain everything in as much detail as you want.
Verify Everything Works
node --version # β
v20.x or higher
npm --version # β
10.x or higher
git --version # β
2.40+
code --version # β
any version
claude --version # β
latest
gh --version # β
2.x
vercel --version # β
latestCommon Problems & Fixes
Hit a wall? One of these probably covers it.
β οΈnpm ERR! EACCES: permission deniedβΆ
Why it happens
Node was installed system-wide (not via nvm), so npm can't write to protected folders.
How to fix it
Uninstall Node, install nvm, then reinstall Node via nvm. nvm installs everything to your home directory, so no sudo needed.
β οΈcommand not found: claudeβΆ
Why it happens
npm installed claude-code but the PATH doesn't include npm's global bin directory.
How to fix it
Make sure you're using nvm's node (run nvm use --lts). Then re-run npm install -g @anthropic-ai/claude-code. If it still fails, open a new terminal window. PATH changes don't apply to existing sessions.
β οΈClaude Code authentication error / login loopβΆ
Why it happens
The login flow expects a claude.ai account (not just an API key), or the token has expired.
How to fix it
Go to claude.ai and make sure you have an active account. Run claude auth logout then claude auth login to get a fresh token.
β οΈVercel build failing: 'command not found' or missing moduleβΆ
Why it happens
A dependency is missing from package.json, or an import path is wrong.
How to fix it
Check the Vercel build log (Dashboard β Deployments β click the failed deploy β Build Logs). The error is almost always on the last few lines. Common fix: make sure all imports use the correct path casing. Linux (Vercel's server) is case-sensitive, Mac is not.
β οΈgit push rejected: Updates were rejectedβΆ
Why it happens
Someone (or a previous push) updated the remote branch and your local copy is behind.
How to fix it
Run git pull --rebase origin main to pull the latest changes and replay your commits on top. Then push again.
β οΈnpm run dev works but localhost:3000 is blank or shows an errorβΆ
Why it happens
A syntax error or import error crashed the Next.js dev server during hot reload.
How to fix it
Look at the terminal where npm run dev is running. The error message will point to the exact file and line. Fix it and the page will auto-refresh.
I'm having a problem setting up my development environment. Here's the exact error message I'm seeing: [paste your error here]. I'm on [Mac/Windows/Linux] and I was trying to [what you were doing]. What's causing this and how do I fix it step by step?
π Copy this prompt and paste it into Claude, ChatGPT, or Gemini β it will explain everything in as much detail as you want.