npm-compatible registry
Implements the npm registry API. Both Yarn 1 and Yarn 2+ resolve packages through it transparently.
Dedicated guidance for Yarn 1 (Classic) and Yarn 2+ (Berry) — including workspaces and Plug'n'Play projects.
Implements the npm registry API. Both Yarn 1 and Yarn 2+ resolve packages through it transparently.
Works with legacy Yarn Classic projects, Yarn Berry workspaces, and Plug'n'Play installs.
Public read access over HTTPS. Drop the URL in .yarnrc or .yarnrc.yml and you are done.
Use this URL wherever Yarn asks for a registry. The npm-group endpoint also works if you prefer to standardize.
yarn config set registry https://mirror.kargadan.ir/repository/yarn-group/
# Verify
yarn config get registry
registry "https://mirror.kargadan.ir/repository/yarn-group/"
yarn add react react-dom
yarn add -D typescript @types/react
yarn install --frozen-lockfile
yarn config set npmRegistryServer https://mirror.kargadan.ir/repository/yarn-group/
npmRegistryServer: "https://mirror.kargadan.ir/repository/yarn-group/"
# Optional: scope override for private packages
npmScopes:
mycompany:
npmRegistryServer: "https://npm.example.com/"
yarn install --immutable
yarn add react react-dom next
yarn add -D typescript eslint prettier
{
"name": "my-monorepo",
"private": true,
"workspaces": ["packages/*", "apps/*"]
}
yarn install
yarn workspace @myorg/web add react
yarn workspace @myorg/api add express
yarn workspaces foreach -A run build
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"]
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
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 type | Group npm-compatible |
| Upstream sources | Chabokan, Pardisco, Jamko, Runflare, registry.npmjs.org |
| Compatible with | Yarn 1Yarn 2+ |
| Protocols | HTTPS · HTTP |
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.