Explore core workflows Dive into monorepo orchestration Browse all 151 guides Publish & release safely

Modern JavaScript Package Publishing & Monorepo Management

Practical, production-focused guides for building, publishing and maintaining JavaScript and TypeScript packages — from a single library to a monorepo with dozens of packages. Browse by section, jump straight to the error you are seeing, or follow a path for the job in front of you.

151 focused guides27 in-depth topics3 sectionsnpm · pnpm · Yarn · Turborepo · Nx

Start with the job in front of you

Publish a package that works everywhere

Get the manifest, module formats and types right, then prove it before release.

Set up or scale a monorepo

Workspaces, internal dependencies, a task runner and caching that keeps CI fast.

Fix a failing install or build

Resolution conflicts, lockfile drift, ESM/CJS errors and missing types.

Harden and automate releases

Trusted publishing, provenance, 2FA, release channels and the package lifecycle.

Where to start A decision diagram mapping what you are doing — building a package, running many packages, or shipping them — to the section to start in. What are you working on? start from the job, not the tool Core Workflows manifest, deps, ESM/CJS, types, builds one package Monorepo Orchestration workspaces, task runners, CI many packages Publishing & Release versions, registries, security shipping
Pick the section that matches the job in front of you; every section links onward to the others.

Browse all topics and guides

Every topic below opens a full reference page — concepts, configuration, internals, CI integration and pitfalls — and each lists its focused guides. Expand a topic to jump straight to a guide.

How the site is organised The home page leads to three sections; each section contains topics, and each topic contains focused guides. This page browse everything Core Workflows 11 topics · 68 guides Monorepo Orchestration 10 topics · 46 guides Publishing & Release 6 topics · 37 guides Topic pages concepts, configuration, CI Guides one task or error each
Three sections, 27 topics and 151 focused guides — every guide is at most two clicks from this page.

Core JavaScript Package Workflows

The manifest, dependency resolution, lockfiles, module formats, TypeScript declarations, builds and the tooling that keeps installs consistent. 11 topics and 68 guides.

Bundling and Build Tooling for Libraries

A library bundler turns your TypeScript source into the exact .mjs, .cjs, and .d.ts artifacts your package.json exports map promises consumers — get the bundler wrong…

7 guides

Dependency Auditing and Automated Updates

Dependencies rot: a lockfile that was clean at release accrues known vulnerabilities and drifts behind upstream within weeks.

7 guides

Dependency Resolution Explained

Every npm install, pnpm install, or yarn install runs the same fundamental job: take a set of declared version ranges, walk the registry metadata, and collapse the…

8 guides

ESM and CJS Interoperability

A modern JavaScript package is expected to load cleanly whether a consumer writes import, require, a tsconfig with moduleResolution: "bundler", or a webpack config from…

8 guides

Monorepo Architecture & Orchestration

Workspaces, internal dependencies, task runners, caching, affected CI, TypeScript project references and migrating into (or out of) a monorepo. 10 topics and 46 guides.

CI/CD Pipeline Optimization for Monorepos

A monorepo CI pipeline that rebuilds and retests every package on every commit gets slower with each package you add, until a one-line change waits twenty minutes for…

7 guides

Package Publishing & Release Engineering

Versioning, the publish itself, registries and access, supply-chain security, release channels and the long tail of a package's life. 6 topics and 37 guides.

Private Registries and Access Control

Publishing internal packages to the public npm registry leaks your code and namespace; publishing them with no access controls invites supply-chain compromise.

7 guides

Supply-Chain Security Hardening

The npm registry is a remote-code-execution channel: every npm install downloads and can execute arbitrary code from hundreds of maintainers you have never met.

9 guides

Find a fix by error message

Seeing a specific error? Match it here and go straight to the guide that explains the cause and the fix.

Error or symptom Guide
ERR_REQUIRE_ESM Fixing ERR_REQUIRE_ESM in Node.js
ERR_MODULE_NOT_FOUND Fixing ERR_MODULE_NOT_FOUND for Extensionless Imports
ERR_PACKAGE_PATH_NOT_EXPORTED Fixing ERR_PACKAGE_PATH_NOT_EXPORTED
ERR_UNKNOWN_FILE_EXTENSION ".ts" Fixing ERR_UNKNOWN_FILE_EXTENSION for .ts Files
Cannot use import statement outside a module Fixing 'Cannot use import statement outside a module'
ERESOLVE unable to resolve dependency tree Fixing npm ERESOLVE Peer Dependency Conflicts
ETARGET No matching version found Fixing npm ETARGET 'No Matching Version Found'
npm ci lockfile out of sync Fixing 'npm ci' Lockfile Out of Sync Errors
ERR_PNPM_OUTDATED_LOCKFILE Fixing pnpm ERR_PNPM_OUTDATED_LOCKFILE in CI
YN0028 lockfile would have been modified Fixing Yarn 'The Lockfile Would Have Been Modified' (YN0028)
ERR_PNPM_WORKSPACE_PKG_NOT_FOUND Fixing ERR_PNPM_WORKSPACE_PKG_NOT_FOUND
Unsupported URL Type "workspace:" Fixing 'Unsupported URL Type workspace:' After Publishing
TS6305 Output file has not been built Fixing TS6305 'Output File Has Not Been Built From Source'
Failed to process project graph (Nx) Fixing Nx 'Failed to Process Project Graph'
Cannot find matching keyid (Corepack) Fixing Corepack Signature Verification Errors
npm publish 403 Forbidden Fixing npm publish 403 Forbidden Errors
npm publish E404 Not Found Fixing npm publish E404 Not Found
EOTP one-time password required Fixing npm EOTP One-Time Password Errors
E401 on a private registry Fixing npm 401 Unauthorized on a Private Registry
SELF_SIGNED_CERT_IN_CHAIN Fixing SELF_SIGNED_CERT_IN_CHAIN on Internal Registries
process is not defined in the browser Fixing 'process is not defined' in Browser Bundles
command not found in npm scripts Fixing 'command not found' for Local Binaries in npm Scripts

Follow a package from first commit to retirement

Most questions belong to one stage of a package's life. These are the topics to open for each stage:

The life of a package Four stages of a package from authoring through validation and publishing to maintenance, each covered by topics on this site. Author package.json, ESM/CJS, types, builds Validate publint, types, tarball smoke tests Publish versions, registries, provenance Maintain channels, LTS, deprecation
Most problems belong to one stage; the topics for each stage are linked below.

New on the site

This update adds six topics and 94 guides. The new topics:

  • Testing and Validating Packages Before Publishing — A package can pass every unit test in its repository and still be broken for the people who install it: the tarball is missing dist/, the exports map sends CommonJS…
  • Package Manager Version Management — When developers, CI runners and dependency bots each use a different version of npm, pnpm or Yarn, the same repository produces different lockfiles, different…
  • Monorepo Migration and Adoption — Moving from many repositories to one — or deciding which parts should stay separate — is an organisational change as much as a technical one, and most failed monorepo…
  • TypeScript Project References in Monorepos — Type-checking a monorepo package by package with tsc --noEmit repeats work: every package re-checks its dependencies' source from scratch, editors load the whole…
  • Release Channels and Dist-Tags — Every npm install your-lib without a version installs whatever the latest dist-tag points to — so dist-tags, not version numbers, decide what most users get.
  • Package Deprecation and Lifecycle — Publishing a package is the beginning of a commitment, and most of a package's life happens after the first release: versions that must be retired because they are…

How the guides are written

Each section page gives the big picture for one area and links to its topics. Each topic page is a full reference: what the tool or concept does, how it works internally, how to configure it, how to run it in CI, and the pitfalls to avoid. Each guide handles one task or error message, starting from the exact symptoms, explaining the root cause, and ending with a verified fix, validation commands and guardrails that stop the problem coming back. Code examples assume Node.js 18 or later and current releases of npm, pnpm, Yarn, Turborepo and Nx.