next.js
63afeee0 - Link Node crypto prerender errors to the crypto error page (#102252)

Commit
2 days ago
Link Node crypto prerender errors to the crypto error page (#102252) When a Server Component calls a synchronous Node crypto API such as `randomBytes(16)` during prerendering, the terminal names the right function but links to the `Math.random()` error page. The dev overlay already links the same call to the crypto page. Classify the seven instrumented `node:crypto` calls as crypto so the terminal prints the same link: ```diff -Learn more: https://nextjs.org/docs/messages/blocking-prerender-random +Learn more: https://nextjs.org/docs/messages/blocking-prerender-crypto ``` ## Verification - Exercised all seven Node API wrappers against the diagnostic factories before and after the change. Checked the server, runtime-prerender, and client error URLs, with `Math.random()` and callback-based `randomBytes` and `randomInt` as controls. - Updated the 32 affected production build snapshots across eight routes in the existing end-to-end suite. The four `getRandomValues` snapshots already pointed to the crypto page. Found while reviewing #102245. This fix can merge independently. <!-- NEXT_JS_LLM -->
Author
Parents
Loading