VO tries to fix this and tells me it has but this error continues on deploy.
20:28:26.390 Running build in Washington, D.C., USA (East) – iad1
20:28:26.391 Build machine configuration: 2 cores, 8 GB
20:28:26.414 Cloning github.com/bellatwoshoes/v0-Kinetic-Leisure (Branch: webiste-latest-12, Commit: 61ef3d9)
20:28:26.552 Previous build caches not available
20:28:27.302 Cloning completed: 887.000ms
20:28:27.749 Running “vercel build”
20:28:28.266 Vercel CLI 48.2.9
20:28:28.707 Detected pnpm-lock.yaml 9 which may be generated by pnpm@9.x or pnpm@10.x
20:28:28.707 Using pnpm@10.x based on project creation date
20:28:28.708 To use pnpm@9.x, manually opt in using corepack (Configuring a Build)
20:28:28.727 Installing dependencies…
20:28:29.389 Lockfile is up to date, resolution step is skipped
20:28:29.434 Progress: resolved 1, reused 0, downloaded 0, added 0
20:28:29.482 Packages: +285
20:28:29.483 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
20:28:30.435 Progress: resolved 285, reused 0, downloaded 82, added 37
20:28:31.435 Progress: resolved 285, reused 0, downloaded 144, added 71
20:28:32.882 Progress: resolved 285, reused 0, downloaded 145, added 71
20:28:33.883 Progress: resolved 285, reused 0, downloaded 154, added 75
20:28:34.886 Progress: resolved 285, reused 0, downloaded 172, added 79
20:28:35.909 Progress: resolved 285, reused 0, downloaded 183, added 83
20:28:36.910 Progress: resolved 285, reused 0, downloaded 271, added 115
20:28:37.913 Progress: resolved 285, reused 0, downloaded 285, added 144
20:28:38.913 Progress: resolved 285, reused 0, downloaded 285, added 154
20:28:39.914 Progress: resolved 285, reused 0, downloaded 285, added 172
20:28:40.914 Progress: resolved 285, reused 0, downloaded 285, added 182
20:28:41.914 Progress: resolved 285, reused 0, downloaded 285, added 280
20:28:41.938 Progress: resolved 285, reused 0, downloaded 285, added 285, done
20:28:42.216
20:28:42.218 dependencies:
20:28:42.218 + @hookform/resolvers 3.10.0
20:28:42.219 + @neondatabase/serverless 1.0.2
20:28:42.219 + @radix-ui/react-accordion 1.2.2
20:28:42.219 + @radix-ui/react-alert-dialog 1.1.15
20:28:42.221 + @radix-ui/react-aspect-ratio 1.1.1
20:28:42.221 + @radix-ui/react-avatar 1.1.2
20:28:42.221 + @radix-ui/react-checkbox 1.3.3
20:28:42.222 + @radix-ui/react-collapsible 1.1.2
20:28:42.222 + @radix-ui/react-context-menu 2.2.4
20:28:42.222 + @radix-ui/react-dialog 1.1.15
20:28:42.223 + @radix-ui/react-dropdown-menu 2.1.16
20:28:42.223 + @radix-ui/react-hover-card 1.1.4
20:28:42.223 + @radix-ui/react-label 2.1.7
20:28:42.224 + @radix-ui/react-menubar 1.1.4
20:28:42.224 + @radix-ui/react-navigation-menu 1.2.3
20:28:42.224 + @radix-ui/react-popover 1.1.4
20:28:42.225 + @radix-ui/react-progress 1.1.1
20:28:42.225 + @radix-ui/react-radio-group 1.2.2
20:28:42.225 + @radix-ui/react-scroll-area 1.2.2
20:28:42.226 + @radix-ui/react-select 2.2.6
20:28:42.226 + @radix-ui/react-separator 1.1.1
20:28:42.226 + @radix-ui/react-slider 1.2.2
20:28:42.227 + @radix-ui/react-slot 1.2.3
20:28:42.227 + @radix-ui/react-switch 1.2.6
20:28:42.227 + @radix-ui/react-tabs 1.1.13
20:28:42.227 + @radix-ui/react-toast 1.2.15
20:28:42.228 + @radix-ui/react-toggle 1.1.1
20:28:42.228 + @radix-ui/react-toggle-group 1.1.1
20:28:42.228 + @radix-ui/react-tooltip 1.1.6
20:28:42.229 + @stripe/react-stripe-js 5.2.0
20:28:42.229 + @stripe/stripe-js 8.0.0
20:28:42.229 + @supabase/ssr 0.7.0
20:28:42.230 + @supabase/supabase-js 2.75.0
20:28:42.230 + @vercel/analytics 1.3.1
20:28:42.230 + autoprefixer 10.4.20
20:28:42.231 + class-variance-authority 0.7.1
20:28:42.231 + clsx 2.1.1
20:28:42.231 + cmdk 1.0.4
20:28:42.231 + date-fns 4.1.0
20:28:42.231 + embla-carousel-autoplay 8.6.0
20:28:42.232 + embla-carousel-react 8.5.1
20:28:42.236 + geist 1.3.1
20:28:42.237 + google-maps 4.3.3
20:28:42.237 + input-otp 1.4.1
20:28:42.237 + lucide-react 0.454.0
20:28:42.237 + next 15.2.4
20:28:42.237 + next-themes 0.4.6
20:28:42.237 + react 19.0.0
20:28:42.237 + react-day-picker 9.8.0
20:28:42.237 + react-dom 19.0.0
20:28:42.237 + react-hook-form 7.60.0
20:28:42.237 + react-resizable-panels 2.1.7
20:28:42.237 + recharts 2.15.4
20:28:42.237 + server-only 0.0.1
20:28:42.238 + sonner 1.7.4
20:28:42.238 + stripe 19.1.0
20:28:42.238 + tailwind-merge 2.5.5
20:28:42.238 + tailwindcss-animate 1.0.7
20:28:42.238 + vaul 0.9.9
20:28:42.238 + zod 3.25.67
20:28:42.238
20:28:42.238 devDependencies:
20:28:42.238 + @tailwindcss/postcss 4.1.9
20:28:42.238 + @types/node 22.0.0
20:28:42.238 + @types/react 19.0.0
20:28:42.238 + @types/react-dom 19.0.0
20:28:42.238 + postcss 8.5.0
20:28:42.238 + tailwindcss 4.1.9
20:28:42.238 + tw-animate-css 1.3.3
20:28:42.238 + typescript 5.0.2
20:28:42.238
20:28:42.238 ╭ Warning ─────────────────────────────────────────────────────────────────────╮
20:28:42.238 │ │
20:28:42.238 │ Ignored build scripts: @tailwindcss/oxide, sharp. │
20:28:42.238 │ Run “pnpm approve-builds” to pick which dependencies should be allowed │
20:28:42.238 │ to run scripts. │
20:28:42.238 │ │
20:28:42.238 ╰──────────────────────────────────────────────────────────────────────────────╯
20:28:42.238
20:28:42.257 Done in 13.3s using pnpm v10.18.2
20:28:42.278 Detected Next.js version: 15.2.4
20:28:42.290 Running “pnpm run build”
20:28:42.569
20:28:42.570 > my-v0-project@0.1.0 build /vercel/path0
20:28:42.570 > next build
20:28:42.570
20:28:43.201 Attention: Next.js now collects completely anonymous telemetry regarding usage.
20:28:43.202 This information is used to shape Next.js’ roadmap and prioritize features.
20:28:43.202 You can learn more, including how to opt-out if you’d not like to participate in this anonymous program, by visiting the following URL:
20:28:43.202 Telemetry | Next.js by Vercel - The React Framework
20:28:43.202
20:28:43.261 ▲ Next.js 15.2.4
20:28:43.262
20:28:43.317 Creating an optimized production build …
20:28:59.802 Failed to compile.
20:28:59.803
20:28:59.803 ./app/actions/homepage.ts
20:28:59.804 Error: e[31mxe[0m Only async functions are allowed to be exported in a “use server” file.
20:28:59.804 e[31m|e[0m
20:28:59.804 ,-[e[36;1;4m/vercel/path0/app/actions/homepage.tse[0m:71:1]
20:28:59.804 e[2m68e[0m | }
20:28:59.804 e[2m69e[0m | }
20:28:59.804 e[2m70e[0m |
20:28:59.805 e[2m71e[0m | export default { getHomepageSections, updateSectionOrder, toggleSectionVisibility }
20:28:59.805 : e[35;1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^e[0m
20:28:59.805 ---- 20:28:59.805 20:28:59.806 Import trace for requested module: 20:28:59.806 ./app/actions/homepage.ts 20:28:59.806 ./app/admin/homepage/page.tsx 20:28:59.806 20:28:59.806 ./app/actions/homepage.ts 20:28:59.807 Error: e[31mxe[0m Only async functions are allowed to be exported in a "use server" file. 20:28:59.807 e[31m|e[0m 20:28:59.807 ,-[e[36;1;4m/vercel/path0/app/actions/homepage.tse[0m:71:1] 20:28:59.807 e[2m68e[0m | } 20:28:59.807 e[2m69e[0m | } 20:28:59.808 e[2m70e[0m | 20:28:59.808 e[2m71e[0m | export default { getHomepageSections, updateSectionOrder, toggleSectionVisibility } 20:28:59.808 : e[35;1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^e[0m 20:28:59.808 ----
20:28:59.808
20:28:59.809 Import trace for requested module:
20:28:59.809 ./app/actions/homepage.ts
20:28:59.809 ./app/page.tsx
20:28:59.809
20:28:59.826
20:28:59.826 > Build failed because of webpack errors
20:28:59.861 ELIFECYCLE Command failed with exit code 1.
20:28:59.918 Error: Command “pnpm run build” exited with 1
You’re currently using a default export of an object like this
export default {
getHomepageSections,
updateSectionOrder,
toggleSectionVisibility
}
You’ll need to eliminate that and instead export each function individually
export async function updateSectionOrder
export async function toggleSectionVisibility
When you add “use server” to a file, it turns all of its exports into server functions, and an object cannot be a server function
I’ll also note that server functions are meant to be used for mutations, and getHomepageSections doesn’t sound like a mutation. You may want to move that one into a different file that is not marked with “use server”, or if it’s only used in this file, then just avoid exporting it
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.