Skip to content

TanStack Start >> Clerk >> WebHooks >> Netlify #4762

Closed

Description

@ttessarolo

Which project does this relate to?

Start

Describe the bug

I've tried Clerk Webhooks on localhost with success (API Route). When published on Netlify I'm getting this error (not related to webook validation or secretes):

Jul 24, 03:46:36 PM: c61bb29d ERROR  Error verifying webhook: Error: ENOENT: no such file or directory, mkdir '/opt/build'
    at async Object.mkdir (node:internal/fs/promises:852:10)
    at async Object.setItem (file:///var/task/chunks/_/ssr.mjs:1000:4)
    at async AsyncFunction.__executeServer (file:///var/task/chunks/_/ssr.mjs:909:80)
    at async client (file:///var/task/chunks/_/ssr.mjs:1103:17)
    at async Object.serverFn (file:///var/task/chunks/_/ssr.mjs:4585:18)
    at async server (file:///var/task/chunks/_/ssr.mjs:1108:20)
    at async client (file:///var/task/chunks/_/ssr.mjs:1103:17)
    at async file:///var/task/chunks/_/ssr.mjs:4748:22
    at async NeonSession.transaction (file:///var/task/node_modules/drizzle-orm/neon-serverless/session.js:183:22)
    at async Object.serverFn (file:///var/task/chunks/_/ssr.mjs:4739:2) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: '/opt/build'
}

Your Example Website or App

https://no.disclosure.com

Steps to Reproduce the Bug or Issue

Deploy WebHook to Netfly

Expected behavior

Just works

Screenshots or Videos

No response

Platform

"@tanstack/react-router": "^1.129.8",
"vite": "npm:rolldown-vite@^7.0.10",

Additional context

No response

Activity

  1. changed the title [-]TanStack Start >> Clerk >> WebHooks >> Netigly[/-] [+]TanStack Start >> Clerk >> WebHooks >> Netlify[/+] on Jul 24, 2025
  2. schiller-manuel commented on Jul 24, 2025

    @schiller-manuel
    Collaborator

    without any code we are not able to investigate

  3. ttessarolo commented on Jul 24, 2025

    @ttessarolo
    Author

    I see. But this is part of a big code base and it is hard to replicate just that part.
    Anyway it seams to be ssr.mjs trying to write in a non existing folder after deployment.

  4. Ugzuzg commented on Sep 6, 2025

    @Ugzuzg

    I've just upgraded to 1.131.35 and have a similar issue on Vercel. https://personal-space-git-upgrade-tanstack-ugzuzgs-projects.vercel.app/en/climbing

    DefaultCatchBoundary Error: Error: ENOENT: no such file or directory, mkdir '/vercel'
    

    Ugzuzg/personal-space#21

  5. LadyBluenotes commented on Jul 15, 2026

    @LadyBluenotes
    Member

    This appears to have been addressed by #6940. The static server function cache no longer attempts to write into the build output during normal production runtime, which matches the /opt/build and /vercel failures reported here.

    Could either of you retry this with the current Start version and confirm? I haven't reproduced the original Netlify or Vercel deployment itself, but if you can reproduce this on a current version of Start can you open a new issue with a repro?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions