Skip to content

Latest commit

 

History

History
153 lines (100 loc) · 2.15 KB

File metadata and controls

153 lines (100 loc) · 2.15 KB

Setup Guide

Complete setup instructions for running this portfolio locally.


Prerequisites

  • Node.js 14.16.0 (required - newer versions cause OpenSSL errors)
  • Yarn package manager
  • Git

Step 1: Install NVM (Node Version Manager)

NVM lets you switch between Node versions easily.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Restart your terminal or run:

source ~/.bashrc

Step 2: Install Node 14.16.0

nvm install 14.16.0
nvm use 14.16.0

Verify:

node --version
# Should output: v14.16.0

Step 3: Clone the Repository

git clone https://github.com/YOUR-USERNAME/YOUR-REPO.git
cd YOUR-REPO

Step 4: Install Dependencies

yarn install

Step 5: Start Development Server

yarn start

Or explicitly with the correct Node version:

PATH="$HOME/.nvm/versions/node/v14.16.0/bin:$PATH" npx gatsby develop

Open http://localhost:8000


Troubleshooting

OpenSSL Error

error:0308010C:digital envelope routines::unsupported

Cause: Wrong Node version (Node 17+ uses OpenSSL 3 which breaks webpack)

Fix: Use Node 14.16.0:

nvm use 14.16.0

Cache Issues

If you see stale content or weird errors:

yarn clean
yarn start

Port Already in Use

Something is already running at port 8000

Fix: Either:

  1. Use a different port (Gatsby will prompt you)
  2. Kill the existing process:
    kill $(lsof -t -i:8000)

Production Build

Build static files:

yarn build

Preview production build locally:

yarn serve

Opens at http://localhost:9000


Deployment (Netlify)

  1. Push code to GitHub
  2. Go to netlify.com
  3. Click "Add new site" → "Import an existing project"
  4. Connect your GitHub repo
  5. Build settings (auto-detected from netlify.toml):
    • Build command: npm run build
    • Publish directory: public
  6. Click "Deploy site"

The netlify.toml ensures Node 14.16.0 is used during build.