Files
next.js/test
Luke SandbergandGitHub e0b2cebde5 Improve the NFT error message and ignore comment handling (#95144)
Fixes #95125 in two ways

The OP admits that they misread the message in a few ways, but we can
fix all of them

1. Be specific about what function might need an annotation in the error
message. A user with a nearby `path.join` might think that that is where
the annotation belongs instead of on the function with the warning.

2. Be more flexible with how these `ignore` comments are interpreted
`fs.readFileSync(path.join(process.cwd(), someVar))` shouldn't require 2
annotations. Handle this by checking for and detecting `turbopackIgnore`
comments in all expressions! This will then bubble up through the linker
and just cause us to ignore corresponding fs access apis.
2026-07-14 08:13:12 +02:00
..
…

See Testing for more information on how you can run/write/debug tests for Next.js.