Error: Cannot find module '@libsql/darwin-arm64' when using Drizzle/SST
I'm using SST in a monorepo with Drizzle, and my Drizzle setup is in a separate workspace package.
When I try calling code that invokes the Drizzle client I get this error about missing a platform specific module:
This from this API handler in
With
If I explicitly add
I have a Next.js app running on Vercel (for now) also importing the database package and that works just fine.
When I try calling code that invokes the Drizzle client I get this error about missing a platform specific module:
This from this API handler in
apps/backend:With
db being exported from packages/database here:packages/database has @libsql/client as a dependency, nothing platform specific.If I explicitly add
@libsql/darwin-arm64 as a dependency to apps/backend, then that works for local dev. When I deploy it, it complains about @libsql/linux-x64-gnu of course, but this should just work without a hack like that, right?I have a Next.js app running on Vercel (for now) also importing the database package and that works just fine.