fix: untrack next-env.d.ts and generate via next typegen#18239
Merged
Conversation
next-env.d.ts is auto-generated by Next.js and the official recommendation is to keep it out of source control. Since Next 16, dev and build use different distDirs (.next/dev vs .next), so the file's content diverges between modes — making a stable committed version impossible. Revert versioning the file (#18139) and have `pnpm type-check` invoke `next typegen` to generate it on demand. typegen ships in Next 15.5+ and runs in ~600ms without a full build, producing the canonical build-mode types in .next/types/. Refs: https://nextjs.org/docs/app/api-reference/config/typescript vercel/next.js#85738
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Avoids "cannot find module" errors until the `next-env.d.ts` file is generated by a fresh clone running `npx tsc --noEmit`
wackerow
approved these changes
May 21, 2026
Member
wackerow
left a comment
There was a problem hiding this comment.
Thanks @pettinarip, looks good! Just added a commit updating one skill and the agents documentation to point to use of pnpm type-check over npx tsx --noEmit to avoid errors on fresh clones/worktrees.
mendezespinozaf5-bot
approved these changes
May 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

next-env.d.tshas shown up dirty after everydev/buildsince #18139. Next 16 writes a different path in dev vs build (.next/dev/types/...vs.next/types/...— vercel/next.js#85738), so no committed version is stable. Official guidance is to gitignore it.next-env.d.tsto.gitignore(reverts that piece of ci: consolidate workflows into ci.yml #18139).pnpm type-check→next typegen && tsc --noEmit.next typegen(Next 15.5+) regenerates the file in ~600ms with no full build.