nextjs - 💡(How to fix) Fix Docs: Dashboard-App Chapter 13 highlighted line off by one [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85676Fetched 2026-04-08 02:14:27
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Assignees
Timeline (top)
assigned ×1closed ×1commented ×1issue_type_added ×1

Error Message

Code Example

console.log(invoice); // Invoice is an empty array []

---

import { notFound } from 'next/navigation';
RAW_BUFFERClick to expand / collapse

What is the documentation issue?

In the Dashboard App Chapter 13 there are 2 highlighted lines that are off by one in the Handling 404 section.

/app/lib/data.ts code block

This says to add a console log message but it highlights the line below console log.

I expect this to instead highlight this line:

console.log(invoice); // Invoice is an empty array []

/dashboard/invoices/[id]/edit/page.tsx code block

This says to import notFound, but it highlights the line below the import.

I expect it to instead highlight this line:

import { notFound } from 'next/navigation';

Is there any context that might help us understand?

This was unexpected while going through this tutorial.

Does the docs page already exist? Please link to it.

https://nextjs.org/learn/dashboard-app/error-handling#handling-404-errors-with-the-notfound-function

extent analysis

TL;DR

Update the highlighted lines in the Dashboard App Chapter 13 documentation to correctly reference the intended code lines for adding a console log message and importing the notFound function.

Guidance

  • Review the documentation for Chapter 13 and verify that the highlighted lines match the expected code, specifically the console.log(invoice) line and the import { notFound } from 'next/navigation'; line.
  • Check the rendering of the documentation to ensure that the highlighting is correctly applied to the intended lines of code.
  • Compare the documentation source with the actual code in /app/lib/data.ts and /dashboard/invoices/[id]/edit/page.tsx to identify any discrepancies.
  • Update the documentation to reflect the correct highlighting, if necessary.

Example

No code changes are required, only updates to the documentation highlighting.

Notes

This issue appears to be a documentation error rather than a code issue, so no functional changes are needed. The fix involves updating the documentation to correctly highlight the relevant code lines.

Recommendation

Apply workaround: Update the documentation highlighting to match the expected code lines, as this is a documentation issue rather than a code problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING