{"record":{"id":"705dbc48138254cc","repo":"vercel/next.js","slug":"warning-nextscript-attribute-crossorigin-is-d","errorCode":null,"errorMessage":"Warning: `NextScript` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated","messagePattern":"Warning: `NextScript` attribute `crossOrigin` is deprecated\\. https://nextjs\\.org/docs/messages/doc-crossorigin-deprecated","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/pages/_document.tsx","lineNumber":920,"sourceCode":"  }\n\n  render() {\n    const {\n      assetPrefix,\n      buildManifest,\n      unstable_runtimeJS,\n      docComponentsRendered,\n      assetQueryString,\n      disableOptimizedLoading,\n      crossOrigin,\n    } = this.context\n    const disableRuntimeJS = unstable_runtimeJS === false\n\n    docComponentsRendered.NextScript = true\n\n    if (process.env.NODE_ENV !== 'production') {\n      if (this.props.crossOrigin)\n        console.warn(\n          'Warning: `NextScript` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated'\n        )\n    }\n\n    const files: DocumentFiles = getDocumentFiles(\n      this.context.buildManifest,\n      this.context.__NEXT_DATA__.page\n    )\n\n    return (\n      <>\n        {!disableRuntimeJS && buildManifest.devFiles\n          ? buildManifest.devFiles.map((file: string) => (\n              <script\n                key={file}\n                src={`${assetPrefix}/_next/${encodeURIPath(\n                  file\n                )}${assetQueryString}`}","sourceCodeStart":902,"sourceCodeEnd":938,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/pages/_document.tsx#L902-L938","documentation":"Development-only warning inside NextScript.render in pages/_document.tsx: before rendering script tags it checks whether this.props.crossOrigin was passed to <NextScript>. That prop is deprecated; cross-origin asset loading should be configured with the top-level crossOrigin next.config.js setting instead.","triggerScenarios":"Thrown at packages/next/src/pages/_document.tsx:920 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the `crossOrigin` attribute from <NextScript>; it is deprecated."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}