# How to Install Open‑SEO Project Dependencies Using npm or yarn

> Install Open-SEO project dependencies easily with npm or yarn. Follow simple commands after cloning the repository for a quick setup.

- Repository: [Every App/open-seo](https://github.com/every-app/open-seo)
- Tags: how-to-guide
- Published: 2026-08-16

---

**Although Open‑SEO uses pnpm by default, you can install project dependencies with npm or yarn by running standard install commands after cloning the repository.**

Open‑SEO is a monorepo that officially manages dependencies with **pnpm** (declared via the `packageManager` field in the root [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json)). However, the repository structure supports alternative package managers. Below is the complete workflow for installing dependencies with **npm** or **yarn** while maintaining version consistency with the upstream project.

## Prerequisites

Before installing, ensure you have:

- **Node.js** 18+ installed
- **Git** for cloning the repository

## Step‑by‑Step Installation with npm

The npm workflow follows standard Node.js conventions. Because Open‑SEO ships with a `pnpm‑lock.yaml`, you should remove any existing lockfile to avoid version conflicts.

### 1. Clone and Navigate to the Project

```bash
git clone https://github.com/every-app/open-seo.git
cd open-seo

```

### 2. Install Dependencies

```bash
rm -f package-lock.json pnpm-lock.yaml
npm install

```

### 3. Build the Project

```bash
npm run build

```

The `build` script (defined in [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json)) compiles the project using **Vite** and **TypeScript**.

## Step‑by‑Step Installation with yarn

Yarn users follow an identical pattern, substituting `yarn` commands.

### 1. Clone and Navigate to the Project

```bash
git clone https://github.com/every-app/open-seo.git
cd open-seo

```

### 2. Install Dependencies

```bash
rm -f yarn.lock pnpm-lock.yaml
yarn install

```

### 3. Build the Project

```bash
yarn build

```

## Handling the Frozen Lockfile Requirement

The official **Local Development** documentation in [`docs/LOCAL_DEVELOPMENT.md`](https://github.com/every-app/open-seo/blob/main/docs/LOCAL_DEVELOPMENT.md) recommends `pnpm install --frozen-lockfile` to enforce exact versions. Neither npm nor yarn has a direct equivalent, but you can approximate this behavior:

| Approach | Command | Effect |
|----------|---------|--------|
| **Clean install (npm)** | `rm -f package-lock.json && npm install` | Generates fresh lockfile from [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json) ranges |
| **Clean install (yarn)** | `rm -f yarn.lock && yarn install` | Generates fresh lockfile from [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json) ranges |
| **Strict install (yarn)** | `yarn install --frozen-lockfile` | Fails if `yarn.lock` needs updates (requires existing lockfile) |

To verify version alignment, compare your resolved packages against the committed [`pnpm-lock.yaml`](https://github.com/every-app/open-seo/blob/main/pnpm-lock.yaml) in the repository root.

## Key Files and Their Roles

Understanding these files helps diagnose installation issues:

- **[`package.json`](https://github.com/every-app/open-seo/blob/main/package.json)** — Declares all workspace dependencies and scripts; specifies `pnpm@10.30.1` as the default `packageManager`
- **[`pnpm-lock.yaml`](https://github.com/every-app/open-seo/blob/main/pnpm-lock.yaml)** — The authoritative lockfile generated by pnpm; serves as the version source‑of‑truth
- **[`docs/LOCAL_DEVELOPMENT.md`](https://github.com/every-app/open-seo/blob/main/docs/LOCAL_DEVELOPMENT.md)** — Contains the official pnpm‑based setup that npm/yarn workflows adapt
- **`scripts/`** — Directory containing build, migration, and development scripts invoked by `npm run` or `yarn` commands

## Post‑Installation Workflow

After installing dependencies, continue with standard development tasks:

```bash

# Run database migrations (if applicable)

npm run db:migrate:local

# Start the development server

npm run dev

```

These scripts are defined in the root [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json) and work identically across package managers.

## Summary

- Open‑SEO defaults to **pnpm** but supports **npm** and **yarn** through standard Node.js workflows.
- Remove **[`pnpm-lock.yaml`](https://github.com/every-app/open-seo/blob/main/pnpm-lock.yaml)** before installing to prevent lockfile conflicts.
- Use **`rm -f`** to clear existing lockfiles when mimicking `--frozen-lockfile` behavior.
- All [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json) scripts (`build`, `dev`, `db:migrate:local`) function identically across package managers.

## Frequently Asked Questions

### Can I use npm or yarn in production deployments of Open‑SEO?

Yes, both npm and yarn install compatible dependency trees. However, the core maintainers test and deploy using pnpm, so production environments should verify builds pass with your chosen package manager.

### Why does Open‑SEO prefer pnpm over npm or yarn?

According to the [`package.json`](https://github.com/every-app/open-seo/blob/main/package.json) `packageManager` field, the project standardizes on **pnpm@10.30.1** for its disk‑efficient `node_modules` structure and strict workspace handling. This reduces install times and prevents phantom dependency issues in the monorepo layout.

### Will installing with npm or yarn create lockfile conflicts in CI/CD?

Potentially. If your CI pipeline caches lockfiles, ensure you:
1. Delete [`pnpm-lock.yaml`](https://github.com/every-app/open-seo/blob/main/pnpm-lock.yaml) before installing
2. Commit your generated [`package-lock.json`](https://github.com/every-app/open-seo/blob/main/package-lock.json) or `yarn.lock` to version control
3. Configure CI to use the same package manager consistently

### How do I switch from npm/yarn back to pnpm?

Run `corepack enable` to activate Corepack (which respects the `packageManager` field), then execute `pnpm install --frozen-lockfile`. This restores the official development environment as documented in [`docs/LOCAL_DEVELOPMENT.md`](https://github.com/every-app/open-seo/blob/main/docs/LOCAL_DEVELOPMENT.md).