We're experiencing an issue where the Netlify and Vercel adapters fail when running builds locally with @clerk/astro. The problem occurs because @vercel/nft (present in both adapters) scans the /Users directory (where my app is located), which fails due to permission issues.
Details:
- We have a hardcoded
/usersstring inside@clerk/backend(as the base URL for the API) - https://github.com/clerk/javascript/blob/95ac67a143c263bef0c1f589728566ab8f95768d/packages/backend/src/api/endpoints/UserApi.ts#L10 - NFT interprets this as a directory to scan.
- The error occurs in this file: https://github.com/withastro/adapters/blob/8274001d0d1a857e633f456c5f0ff1d469d4b6e4/packages/netlify/src/lib/nft.ts#L38
Temporary workaround:
- When installing
@clerk/astro, installing the@clerk/backenddependency too. (For some reason, NFT skips/Users/**directory when you actually have the dependency installed)
Continuation of https://discord.com/channels/830184174198718474/1281005220431790203