Skip to content

fix: resolve type-check failures breaking every production build - #6958

Merged
hivecommons-hive[bot] merged 1 commit into
kubestellar:mainfrom
Bryandero98:fix/netlify-build-typecheck-failures
Sep 15, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
kubestellar:mainfrom
Bryandero98:fix/netlify-build-typecheck-failures

Conversation

@Bryandero98

Copy link
Copy Markdown
Contributor

Summary

Netlify's production build has failed on every commit to main since 2026-09-09 (Build script returned non-zero exit code: 2), tracked across #6828, #6905, and #6957. The generic auto-filed message never surfaced the real cause since the reporter only relays Netlify's summary line, not the underlying build log - so I reproduced the actual build locally to find it.

Reproduction note: a Windows-side repro hit an unrelated, Windows-only ESM path error (ERR_UNSUPPORTED_ESM_URL_SCHEME in scripts/generate-shared-config.ts's dynamic import()), which is a red herring - that same script runs fine on Linux. The real failure only shows up when reproducing with Node 20.11.1 on Linux, matching netlify.toml's pinned NODE_VERSION and this repo's committed package-lock.json.

next build's "Running TypeScript" step fails with:

vitest.config.ts(3,37): error TS2307: Cannot find module 'rollup' or its corresponding type declarations.
scripts/update-version.test.ts(253,90): error TS1501: This regular expression flag is only available when targeting 'es2018' or later.
scripts/update-version.test.ts(284,93): error TS1501: This regular expression flag is only available when targeting 'es2018' or later.

Root causes

  • vitest.config.ts imported SourceMapInput directly from rollup. vite@8 replaced rollup with rolldown as its bundler (introduced in 🐛 Add missing vite dev dependency so the test suite can start #6834 - the exact commit and date [netlify-deploy-failure] Netlify production deploy failing #6828 was first filed against), so rollup isn't part of the dependency tree at all anymore, not even transitively. vite re-exports the same rolldown-backed types under its own stable Rollup compat namespace precisely for this situation, so this now imports from there (import type { Rollup } from 'vite') instead of reaching into whichever bundler vite happens to use internally - the same class of break shouldn't recur next time vite swaps bundlers again.
  • tsconfig.json's target was still "ES2017", predating the /s (dotAll) regex flags added in [quality] scripts: subprocess tests for update-version.js release automation #6898 on 2026-09-12, which require ES2018+. Bumped to the minimum needed ("ES2018") rather than further, to keep this fix's blast radius small. noEmit: true means this only affects tsc's own syntax acceptance during type-checking - not Turbopack's actual build output.

Test plan

  • Reproduced the exact broken build locally: Node 20.11.1 on Linux (WSL), same npm ci from the committed lockfile, NEXT_PUBLIC_BRANCH=main npm run build - confirmed the 3 type errors above, matching the production failure signature.
  • Applied both fixes, re-ran tsc --noEmit directly - 0 errors.
  • Re-ran the full next build end-to-end with both fixes applied - exits 0, completing type check, static generation (232/232 pages), and page optimization. This is a full local reproduction of the previously-broken production build now succeeding.

Closes #6828, closes #6905, closes #6957

🤖 Generated with Claude Code

Netlify's production build has failed on every commit to main since
2026-09-09 (`Build script returned non-zero exit code: 2`, tracked in
kubestellar#6828/kubestellar#6905/kubestellar#6957) - the generic message never surfaced the real cause
because the maintainer-facing reporter only relays Netlify's summary
line, not the underlying build log.

Reproduced the exact failure locally (Node 20.11.1 on Linux, matching
netlify.toml's pinned NODE_VERSION and this repo's committed
package-lock.json - a Windows repro hit an unrelated, Windows-only ESM
path error and was not representative). `next build`'s "Running
TypeScript" step fails with:

    vitest.config.ts(3,37): error TS2307: Cannot find module 'rollup'
    scripts/update-version.test.ts(253,90): error TS1501: This regular
      expression flag is only available when targeting 'es2018' or later.
    scripts/update-version.test.ts(284,93): error TS1501: (same)

Root causes:

- vitest.config.ts imported `SourceMapInput` from `rollup` directly.
  vite@8 replaced rollup with rolldown as its bundler (introduced in
  kubestellar#6834, which is the exact commit and date kubestellar#6828 was first filed
  against), so `rollup` is no longer part of the dependency tree at
  all - not even transitively. vite re-exports the same rolldown-backed
  types under its own stable `Rollup` compat namespace specifically for
  this kind of consumer code, so that's what this now imports instead
  of reaching into whichever bundler vite happens to use internally.
- tsconfig.json's `target` was still "ES2017", predating the `/s`
  (dotAll) regex flags added in kubestellar#6898 on 2026-09-12, which require
  ES2018+. Bumped to the minimum needed ("ES2018") rather than further,
  to keep this fix's blast radius as small as possible. `noEmit: true`
  means this only affects tsc's own syntax acceptance during type
  checking, not Turbopack's actual output.

Verified end-to-end: `next build` (the literal command netlify.toml
runs) now completes with exit 0 on Linux/Node 20.11.1, past type
check, static generation (232/232 pages), and page optimization - a
full reproduction of the previously-broken production build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: Bryan Saravia <[email protected]>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 15, 2026
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kproche for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellar-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3dd6608
🔍 Latest deploy log https://app.netlify.com/projects/kubestellar-docs/deploys/6aa8cacb97b6000008e1c7ef
😎 Deploy Preview https://deploy-preview-6958--kubestellar-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 15, 2026
@github-actions github-actions Bot added the json label Sep 15, 2026
@kubestellar-prow

Copy link
Copy Markdown

Hi @Bryandero98. Thanks for your PR.

I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow kubestellar-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 15, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit fc4d00d into kubestellar:main Sep 15, 2026
13 of 14 checks passed
Bryandero98 added a commit to Bryandero98/Bryandero98.github.io that referenced this pull request Sep 15, 2026
Regenerar contributions.json capturó el merge de kubestellar/docs#6958
que ocurrió justo después del commit anterior. Se quita de "en curso
ahora" y se actualiza el texto estático de 58 a 59.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bryandero98 added a commit to Bryandero98/Bryandero98.github.io that referenced this pull request Sep 15, 2026
…nguage breakdown

Five improvements identified from a competitive portfolio review:

- Reframe hero tagline and profile copy around automation as the
  explicit specialization (CLIs, MCP servers, CI fixes), tying
  together packetforge/cliguard/captionforge/contrib-radar instead
  of leaving that thread implicit.
- Add contrib-radar's before/after impact line (~1hr manual
  verification across 5 orgs -> a single MCP call).
- Replace the static 7-card contributions grid with a sortable,
  searchable table driven entirely by data/contributions.json. This
  also fixes a real bug: nodered, drawora, kestra, f3nation and
  kubestellar (10 PRs) were fetched by loadContributionsData() but
  silently dropped because no matching HTML card existed for them.
- Add a real language breakdown (JavaScript 86.4%, TypeScript 11.9%,
  Java 1.7%), computed server-side in update-contributions.mjs from
  each contribution group's representative repo, weighted by merged
  PR count, and rendered as bars from the JSON - not hardcoded.
- Add a curated "CI and automation fixes" highlight list separating
  build/pipeline fixes (kubestellar/docs#6958, #6956,
  kubestellar/homebrew-tap#448) from general bug fixes.

Verified: table/sort/filter logic and language percentages checked
against live contributions.json (12/12 groups render, counts sum to
total, ES/EN i18n key parity holds).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/scanner Agent scanner label config dco-signoff: yes Indicates the PR's author has signed the DCO. json needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. typescript

Projects

None yet

1 participant