vercel/next.js · error

Warning: `Head` attribute `crossOrigin` is deprecated. https

Error message

Warning: `Head` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated

What it means

Development-only warning from the Head component's render in pages/_document.tsx: it checks this.props.crossOrigin and warns when set. The crossOrigin prop on Head was deprecated; cross-origin script loading is now configured via the crossOrigin next.config.js option instead of a per-component prop.

Source

Thrown at packages/next/src/pages/_document.tsx:684

        if (!isReactHelmet) {
          if (child?.type === 'title') {
            console.warn(
              "Warning: <title> should not be used in _document.js's <Head>. https://nextjs.org/docs/messages/no-document-title"
            )
          } else if (
            child?.type === 'meta' &&
            child?.props?.name === 'viewport'
          ) {
            console.warn(
              "Warning: viewport meta tags should not be used in _document.js's <Head>. https://nextjs.org/docs/messages/no-document-viewport-meta"
            )
          }
        }
        return child
        // @types/react bug. Returned value from .map will not be `null` if you pass in `[null]`
      })!
      if (this.props.crossOrigin)
        console.warn(
          'Warning: `Head` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated'
        )
    }

    const files: DocumentFiles = getDocumentFiles(
      this.context.buildManifest,
      this.context.__NEXT_DATA__.page
    )

    const nextFontLinkTags = getNextFontLinkTags(
      nextFontManifest,
      dangerousAsPath,
      assetPrefix,
      cssAssetQueryString
    )

    const tracingMetadata = getTracedMetadata(
      getTracer().getTracePropagationData(),

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Remove the `crossOrigin` attribute from Document's <Head>; it is deprecated.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/next/src/pages/_document.tsx:684 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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