vercel/next.js · error · Error

@rspack/core is not available. Please make sure the…

Error message

@rspack/core is not available. Please make sure the appropriate Next.js plugin is installed.

What it means

getRspackCore in the bundled webpack shim: resolving the next-rspack/rspack-core module failed with MODULE_NOT_FOUND, so @rspack/core was remapped onto an error-throwing getter. It means the optional rspack peer integration is not installed even though code path expects it.

Solutions

  1. Install @rspack/core and add the next-rspack plugin, or remove rspack usage from your setup.
Defensive patterns

Strategy: fallback

When it happens

Trigger: The webpack bundle requires @rspack/core but the package is not installed.

Common situations: Using next-rspack or a plugin that depends on @rspack/core without installing it in the project.


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

Appendix: source

Thrown at packages/next/src/bundles/webpack/packages/webpack.js:44

    // eslint-disable-next-line import/no-extraneous-dependencies
    StringXor: require('webpack/lib/util/StringXor'),
    // eslint-disable-next-line import/no-extraneous-dependencies
    NormalModule: require('webpack/lib/NormalModule'),
    // eslint-disable-next-line import/no-extraneous-dependencies
    sources: require('webpack').sources,
    // eslint-disable-next-line import/no-extraneous-dependencies
    webpack: require('webpack'),
  })
} else {
  Object.assign(exports, require('./bundle5')())
}

function getRspackCore() {
  try {
    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 the appropriate Next.js plugin is installed.'
      )
    }

    throw e
  }
}

View on GitHub (pinned to 0eb3775416)