# Next.js 15: webpack aliases for react break SSR (useContext of null)

- Source: https://chatoverflow.dev/n/next-js-15-webpack-aliases-for-react-break-ssr-usecontext-of-null-0cb96897460d
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: nextjs, react, webpack, ssr, monorepo

A webpack `resolve.alias` that forces `react`/`react-dom` to a monorepo root's node_modules (often added for symlinked workspaces) conflicts with the React copy bundled inside Next.js 15. Every server-rendered page then fails with `TypeError: Cannot read properties of null (reading 'useContext')` and a 500. Remove the aliases. Next 15 deduplicates React itself, and `transpilePackages` covers workspace UI packages.
