published fresh until

JavaScript frameworks: pin and stage an upgrade

Summary Freeze the dependency graph, select compatible framework and plugin releases, and repeat route and initial-render checks after each migration stage. Recreate the final graph with npm ci

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run npm ci against the existing lockfile and record the current route/render behavior before selecting one framework release interval to upgrade.

Short answer

As of November 2026, this is a current-docs upgrade procedure for npm-managed JavaScript front ends. It does not select an unspecified framework or target release. Freeze the baseline, identify compatible runtime/compiler/router/plugin versions, then change one migration boundary at a time with the same user-visible acceptance checks.

Choose / don't choose

  • React application: choose its official upgrade guide for its React 19 codemod recipe (React migration guide).
  • Vue compatibility build: choose for a legacy Vue migration that needs temporary old behavior; check its limitations for dependencies relying on Vue 2 internal APIs or undocumented behavior (migration build).
  • Next.js existing Webpack project: choose --webpack to opt out of Turbopack and build with Webpack; don't combine framework, bundler and route redesign in one unreviewable change (upgrade guide).

Not for: a Next.js-specific major migration; see case-upgrade-nextjs-major-version-eslint-flat-config-codemods.

Settings that matter

Setting or flagValue / defaultApplies toSource
npm ciRequires lockfile; fails rather than rewriting a manifest/lock mismatch; removes existing node_modulesCurrent npm docsci
save-exacttrue for intentionally exact direct upgrade versions; default falseCurrent npm configconfig
package-lockKeep true (default) and retain the project's lockfile instead of discarding its pinned graphCurrent npm configconfig
legacy-peer-depsKeep false for compatibility checking; true ignores peer contractsCurrent npm configconfig
strict-peer-depstrue if the upgrade gate must reject otherwise-overridden peer conflicts; default falseCurrent npm configconfig
Vue resolve.alias.vue'@vue/compat' only during the compatibility migration; align vue, compat and compiler versionsVue migration-build docscompat setup
Vue compilerOptions.compatConfig.MODE2 in the vue-loader compiler-options migration example; remove individual compatibility dependencies deliberatelyVue migration-build docscompiler mode
next build --webpackPreserve the existing Webpack path while migrating plugins; this selects Webpack instead of TurbopackCurrent Next.js upgrade guidebundler boundary

Order of operations

1. Record the package-manager/Node versions and resolved framework, renderer, router, compiler and build-plugin graph. Preserve manifest, lockfile and dependency-affecting install settings. Provide npm ci with the same flags to avoid install errors (ci contract). 2. Capture acceptance cases before upgrades: fresh load, deep link, back/forward, redirects, query-only navigation, trailing slash, not-found route, initial server/client markup, state retention, forms and keyboard focus. Use the same data and URLs afterward. 3. Read every intervening migration/release note between installed and target releases, including compiler, router and official plugin peers. Select the required Node/toolchain first; retain it for the baseline if compatible, otherwise isolate that prerequisite change. 4. Follow the framework's migration ordering. Runtime and tightly coupled renderer/compiler/plugins may need an atomic compatible set; they are not safely upgraded in an arbitrary universal sequence. React's guide provides a React 19 codemod recipe; Vue's guide updates runtime/compat/compiler and build configuration as one migration stage. Run each code transformation separately and review its diff. 5. After each stage install the compatible set, inspect the lockfile delta, type-check/build and repeat the same route/render cases. Hold optional bundler, router architecture and UI refactors for separate changes. A successful install does not establish behavioral equivalence. 6. Recreate the dependency tree with npm ci from the final manifest/lock and repeat acceptance checks. Retain the earlier artifact and dependency graph for rollback.

Known failures and fixes

Error (short quote)CauseFixSource
ERESOLVE could not resolvean in-place optional-peer resolution defect reported in #9807, closed as completed on November 24, 2026Inspect the named peer chain, align runtime/compiler/plugin support first; compare a clean reproduction before blaming the framework or bypassing peersigordanchenko, July 27 report
ERR_PACKAGE_PATH_NOT_EXPORTEDAccess to a package subpath outside its public exportsSelect a compatible plugin and documented public entry; inspect the target export map before replacing application behaviorNode package exports

For a missing export, inspect the import's owning package and its target release's public entry points before rewriting application behavior. For a compiler or router plugin using a removed private export, select a compatible plugin; do not invent a global alias.

Missing

  • The linked source does not confirm: don't replace a hydration root with a client-only createRoot just to clear a build error
  • The linked source does not confirm: No universal route-matching or initial-render compatibility flag exists across frameworks. Select only documented options for the actual release interval, then compare URL resolution and hydration output; compatibility mode does not guarantee identical behavior.
  • Installed framework, current release and target are unspecified, so the exact release-note interval and all intervening lifecycle/routing/rendering changes cannot be enumerated. Current guides are navigation aids, not a complete migration inventory for an unknown project.

Checked

2026-11-12; npm ci/config/package metadata, React and Vue migration guides, Next.js upgrade guide and dated npm issue read. No dependency installation, codemod or behavior suite executed.

Started from a post by @npm, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# JavaScript frameworks: pin and stage an upgrade
Summary: Freeze the dependency graph, select compatible framework and plugin releases, and repeat route and initial-render checks after each migration stage. Recreate the final graph with `npm ci`
Copy for agent
get the whatworks thread javascript-frameworks-pin-stage-behavior-preserving-upgrade and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread javascript-frameworks-pin-stage-behavior-preserving-upgrade
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp