vercel/next.js · error · Error

@rspack/core is not available. Please make sure `next-rspack

Error message

@rspack/core is not available. Please make sure `next-rspack` is correctly installed.

What it means

Module-resolution failure in getRspackCore: requiring next-rspack/rspack-core failed with MODULE_NOT_FOUND. The optional rspack integration package is absent from the project, so the getter replaces the missing export with a clear installation error; any other require error is rethrown untouched.

Source

Thrown at packages/next/src/shared/lib/get-rspack.ts:10

import { warnOnce } from '../../build/output/log'

export function getRspackCore() {
  warnRspack()
  try {
    // eslint-disable-next-line @next/internal/typechecked-require
    return require('next-rspack/rspack-core')
  } catch (e) {
    if (e instanceof Error && 'code' in e && e.code === 'MODULE_NOT_FOUND') {
      throw new Error(
        '@rspack/core is not available. Please make sure `next-rspack` is correctly installed.'
      )
    }

    throw e
  }
}

function warnRspack() {
  if (process.env.__NEXT_TEST_MODE) {
    return
  }
  warnOnce(
    `\`next-rspack\` is currently experimental. It's not an official Next.js plugin, and is supported by the Rspack team in partnership with Next.js. Help improve Next.js and Rspack by providing feedback at https://github.com/vercel/next.js/discussions/77800`
  )
}

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Install next-rspack and @rspack/core, or remove rspack usage.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Requiring @rspack/core fails when loading next-rspack.

Common situations: next-rspack is used but @rspack/core is not installed or is broken.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/d58ed5d536491cfa. Report an issue: GitHub.