next.js
bc7af3cf - Fix Go module verification for the bundled Next.js SDK (#102830)

Commit
7 hours ago
Fix Go module verification for the bundled Next.js SDK (#102830) ### What? Apps using the experimental Go SDK can run `go mod verify` before `next build`. The SDK still ships in the `go/` directory of the installed `next` npm package. ### Why? Go rejects versioned module paths whose first segment has no dot. On Go 1.27.2, `go mod verify` fails with `missing ziphash` even when a local replacement exists and the module cache is empty. This blocks builds that verify dependencies before running Next.js. ### How? Use `nextjs.org/go` in the SDK, Next.js module setup, and Turbopack's Go Proxy config recognition. Keep the existing relative replacement to the real installed package. ### Verification - Reproduced the `missing ziphash` error with Go 1.27.2, a local replacement, and an empty module cache. - The SDK setup and Go proxy URL parity suites passed (46 tests). The regression checks verify with an empty cache and networking disabled, then compile against the local SDK in flat, pnpm-style, and hoisted monorepo layouts. - `go test ./...` passed in `packages/next/go`. - Not run: Rust and native Next.js end-to-end tests (no rebuilt native binding for this change). <!-- NEXT_JS_LLM --> --------- Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
Author
Parents
Loading