yarn-group

npm-compatible registry

Implements the npm registry API. Both Yarn 1 and Yarn 2+ resolve packages through it transparently.

v1 / v2+

Classic and Berry

Works with legacy Yarn Classic projects, Yarn Berry workspaces, and Plug'n'Play installs.

Anonymous

No sign-in required

Public read access over HTTPS. Drop the URL in .yarnrc or .yarnrc.yml and you are done.

Registry URL

Use this URL wherever Yarn asks for a registry. The npm-group endpoint also works if you prefer to standardize.

HTTPS · recommended
https://mirror.kargadan.ir/repository/yarn-group/
HTTP · legacy clients only
http://mirror.kargadan.ir/repository/yarn-group/

Yarn 1 (Classic)

Set the registry globally

yarn config set registry https://mirror.kargadan.ir/repository/yarn-group/

# Verify
yarn config get registry

Per-project (.yarnrc)

registry "https://mirror.kargadan.ir/repository/yarn-group/"

Install

yarn add react react-dom
yarn add -D typescript @types/react
yarn install --frozen-lockfile

Yarn 2+ (Berry)

Set via CLI

yarn config set npmRegistryServer https://mirror.kargadan.ir/repository/yarn-group/

Per-project (.yarnrc.yml)

npmRegistryServer: "https://mirror.kargadan.ir/repository/yarn-group/"

# Optional: scope override for private packages
npmScopes:
  mycompany:
    npmRegistryServer: "https://npm.example.com/"

Install

yarn install --immutable
yarn add react react-dom next
yarn add -D typescript eslint prettier

Workspaces (monorepo)

package.json

{
  "name": "my-monorepo",
  "private": true,
  "workspaces": ["packages/*", "apps/*"]
}

Common commands

yarn install
yarn workspace @myorg/web add react
yarn workspace @myorg/api add express
yarn workspaces foreach -A run build

Docker example

FROM node:22-alpine AS deps
WORKDIR /app
RUN yarn config set registry https://mirror.kargadan.ir/repository/yarn-group/
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

FROM node:22-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN yarn build

FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY package.json yarn.lock ./
RUN yarn config set registry https://mirror.kargadan.ir/repository/yarn-group/ \
 && yarn install --frozen-lockfile --production
EXPOSE 3000
CMD ["yarn", "start"]

CI / CD

GitHub Actions

name: Build
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
          cache: 'yarn'
      - run: yarn config set registry https://mirror.kargadan.ir/repository/yarn-group/
      - run: yarn install --frozen-lockfile
      - run: yarn build
      - run: yarn test

GitLab CI

build:
  image: node:22
  before_script:
    - yarn config set registry https://mirror.kargadan.ir/repository/yarn-group/
  script:
    - yarn install --frozen-lockfile
    - yarn build

Mirror information

Mirror typeGroup npm-compatible
Upstream sourcesChabokan, Pardisco, Jamko, Runflare, registry.npmjs.org
Compatible withYarn 1Yarn 2+
ProtocolsHTTPS · HTTP
Plug'n'Play tip

Yarn 2+ Plug'n'Play projects work without changes — the registry is only used to download archive files. Module resolution still happens locally via .pnp.cjs.