Skip to content

fix: resolve webpack lockfile, SEO typing, playground null, and prisma imports - #1031

Merged
ayomideadeniran merged 2 commits into
StellarDevHub:mainfrom
success-OG:fix-build
Aug 8, 2026
Merged

fix: resolve webpack lockfile, SEO typing, playground null, and prisma imports#1031
ayomideadeniran merged 2 commits into
StellarDevHub:mainfrom
success-OG:fix-build

Conversation

@success-OG

Copy link
Copy Markdown
Contributor

closes #949
closes #965
closes #967
closes #968

Summary

Fixes four build/type failures across frontend and backend that blocked compilation and CI.

Task 1 — Frontend webpack SyntaxError (root package-lock.json)

  • Root cause: orphaned root package-lock.json (empty packages: {}, no root package.json) caused Next/webpack to treat the monorepo parent as workspace root and choke while compiling modules like recharts / editor imports.
  • Changes:
    • Deleted orphaned root package-lock.json
    • Ignored /package-lock.json in .gitignore so it cannot return
    • Hardened frontend/next.config.ts:
      • outputFileTracingRoot pinned to frontend
      • transpilePackages: ['recharts']
      • webpack resolve.modules prefers frontend/node_modules
  • Impact: PerformanceMetricsDashboard (recharts), SorobanCompletion / SorobanLanguage, and PeerReviewDashboard import chain no longer fail via the bad root lockfile path.

Task 2 — simulatorSeo.service.ts TS2532 (possibly undefined)

  • Fixed parseSitemapXml to use match[1]?.trim() ?? '' (safe under noUncheckedIndexedAccess)
  • Removed @ts-nocheck
  • Added proper Redis import + graceful memory-only cache fallback when Redis is unavailable
  • SEO meta generation still returns tags for known simulator slugs and null for unknown ones
  • Added backend/tests/simulatorSeo.service.test.ts

Task 3 — Playground LeaderboardEntry not assignable to null

  • In playground.routes.ts, typed leaderboardEntry as LeaderboardEntry | null
  • Removed @ts-nocheck
  • Leaderboard update path unchanged; score endpoint still returns round results + optional entry

Task 4 — Broken Prisma imports in hash / p2p / voting services

  • Services already import from ../db/index.js (correct Prisma client)
  • Added compatibility re-export backend/src/db/prisma.ts for any legacy db/prisma path
  • Updated tests (hash-demo, infrastructure, simulator) to mock ../src/db/index
  • Added smoke tests: backend/tests/hash-p2p-voting.smoke.test.ts

Test plan

  • Confirm root package-lock.json is absent
  • cd frontend && npm install && npm run build completes without webpack SyntaxError
  • Load /performance-metrics, peer review, and playground/editor pages
  • cd backend && npx tsc --noEmit shows no errors in simulatorSeo.service.ts or playground.routes.ts
  • npm test -- --testPathPattern="simulatorSeo|hash-p2p-voting.smoke|hash-demo"
  • POST /api/v1/playground/triage/score with/without playerId returns correctly typed leaderboardEntry

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@success-OG is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@success-OG Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ayomideadeniran

Copy link
Copy Markdown
Contributor

pr under review

ayomideadeniran pushed a commit to success-OG/Web3-Student-Lab that referenced this pull request Aug 4, 2026
@ayomideadeniran

Copy link
Copy Markdown
Contributor

Changes merged to main directly

ayomideadeniran pushed a commit that referenced this pull request Aug 4, 2026
ayomideadeniran pushed a commit that referenced this pull request Aug 6, 2026
Frontend:
- Fix malformed package.json (duplicate keys, missing closing brace)
- Fix vitest.config.ts (duplicate config blocks causing parse error)
- Add missing devDependencies (fake-indexeddb)
- Remove incompatible @vitest/coverage-v8 version

Contracts:
- Fix soroban-sdk version mismatch in did_registry (22.0.0 -> 26.1.0)
- Fix payment_gateway tests (Address references, MAX_REFUND_LEDGERS type)
- Fix parametric_insurance tests (lifetime specifiers, Ledger API usage, std::panic in no_std)
- Fix storage_migration tests (replace std::panic::catch_unwind with #[should_panic])

Backend:
- Restore original package.json and package-lock.json (corrupted by PR #1031)
@ayomideadeniran
ayomideadeniran merged commit a88a84f into StellarDevHub:main Aug 8, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants