From 22ebfc55000b96f42ff99621c7e6dcacae3e89e3 Mon Sep 17 00:00:00 2001 From: tyler Date: Fri, 5 Jun 2026 20:12:32 -0600 Subject: [PATCH] fix: resolve two build errors blocking deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Replace stale supabase import with api in sweet-corn-box page — src/lib/supabase.ts was removed when migrating to better-auth. 2. Stub bun-sqlite-dialect from @better-auth/kysely-adapter via webpack alias — it imports DEFAULT_MIGRATION_TABLE which doesn't exist in kysely 0.29.x and is never used (we use PostgresDialect, not bun-sqlite). Co-Authored-By: Claude Sonnet 4.6 --- next.config.ts | 12 ++++++++++++ src/app/tuxedo/products/sweet-corn-box/page.tsx | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/next.config.ts b/next.config.ts index 541dabe..e5537eb 100644 --- a/next.config.ts +++ b/next.config.ts @@ -121,6 +121,18 @@ const nextConfig: NextConfig = { ]; }, + // Stub out bun-sqlite dialect bundled inside @better-auth/kysely-adapter. + // It imports kysely migration symbols that don't exist in kysely 0.29.x and + // is never used at runtime (we use PostgresDialect). Aliasing to false + // makes webpack treat it as an empty module. + webpack(config) { + config.resolve.alias = { + ...config.resolve.alias, + "@better-auth/kysely-adapter/dist/bun-sqlite-dialect-DzNwOpKv.mjs": false, + }; + return config; + }, + // Experimental features experimental: { // Enable optimizePackageImports for better bundle size diff --git a/src/app/tuxedo/products/sweet-corn-box/page.tsx b/src/app/tuxedo/products/sweet-corn-box/page.tsx index caa03d2..71aaa99 100644 --- a/src/app/tuxedo/products/sweet-corn-box/page.tsx +++ b/src/app/tuxedo/products/sweet-corn-box/page.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import { Fraunces, JetBrains_Mono } from "next/font/google"; -import { supabase } from "@/lib/supabase"; +import { api } from "@/lib/api"; import { getBrandSettingsPublic } from "@/actions/brand-settings"; import SweetCornProductPage from "@/components/storefront/SweetCornProductPage"; @@ -77,7 +77,7 @@ export default async function SweetCornBoxPage() { try { const [brandRes, settingsRes] = await Promise.all([ - supabase.from("brands").select("id, name").eq("slug", BRAND_SLUG).single(), + api.from("brands").select("id, name").eq("slug", BRAND_SLUG).single(), getBrandSettingsPublic(BRAND_SLUG), ]); if (brandRes.data) {