KEMBAR78
docs: Remove AMP docs by devjiwonchoi · Pull Request #84357 · vercel/next.js · GitHub
Skip to content

Conversation

devjiwonchoi
Copy link
Member

@devjiwonchoi devjiwonchoi commented Sep 29, 2025

Stacked on #84312

Removes the AMP docs, which is no longer supported.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. labels Sep 29, 2025
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@devjiwonchoi devjiwonchoi marked this pull request as ready for review September 29, 2025 21:33
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments:

packages/next/src/export/index.ts (line 933):

This code references a documentation page that has been deleted in this PR, resulting in a broken link when users encounter this AMP export validation error.

View Details
📝 Patch Details
diff --git a/packages/next/errors.json b/packages/next/errors.json
index d08ebc67b6..a634e3f176 100644
--- a/packages/next/errors.json
+++ b/packages/next/errors.json
@@ -594,7 +594,7 @@
   "593": "Cannot \\`%s\\` on a ReactServerPrerenderResult that has already been consumed.",
   "594": "query/focusable requires option.strategy to be one of [\"quick\", \"strict\", \"all\"]",
   "595": "when/key requires option[\"%s\"] to be a function",
-  "596": "AMP Validation caused the export to fail. https://nextjs.org/docs/messages/amp-export-validation",
+  "596": "AMP Validation caused the export to fail. https://nextjs.org/docs/pages/guides/amp",
   "597": "The NextURL configuration includes no locale \"%s\"",
   "598": "Invariant: a Page with `dynamic = \"force-dynamic\"` did not trigger the dynamic pathway. This is a bug in Next.js",
   "599": "Cannot call onClose on a WebNextResponse that is already closed",
diff --git a/packages/next/src/export/index.ts b/packages/next/src/export/index.ts
index eaa88b623f..b2b4271189 100644
--- a/packages/next/src/export/index.ts
+++ b/packages/next/src/export/index.ts
@@ -930,7 +930,7 @@ async function exportAppImpl(
   }
   if (hadValidationError) {
     throw new ExportError(
-      `AMP Validation caused the export to fail. https://nextjs.org/docs/messages/amp-export-validation`
+      `AMP Validation caused the export to fail. https://nextjs.org/docs/pages/guides/amp`
     )
   }
 

Analysis

Broken documentation link in AMP export validation error

What fails: ExportError in packages/next/src/export/index.ts:933 links to deleted documentation page

How to reproduce:

# Create Next.js app with AMP page that has validation errors
# Run: next build && next export
# Error shows: "AMP Validation caused the export to fail. https://nextjs.org/docs/messages/amp-export-validation"

Result: Link returns 404 after deployment (file errors/amp-export-validation.mdx deleted in commit 12725b9)

Expected: Link should work or be removed. Error code 596 in packages/next/errors.json:597 has same broken link.

Note: AMP validation is still active (packages/next/src/compiled/amphtml-validator/ exists, validation code runs in exportPagesPage()). URL works now only because nextjs.org hasn't deployed commit 12725b9 yet.

@devjiwonchoi devjiwonchoi merged commit 2318b5e into canary Sep 30, 2025
80 checks passed
@devjiwonchoi devjiwonchoi deleted the jiwon/09-29-docs_remove_amp_docs branch September 30, 2025 13:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

created-by: Next.js team PRs by the Next.js team. Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants