Client and Server code mixing and I don't know how
After migrating from prisma to drizzle I was forced to import "server-only" in my db file:
Because i was seeing errors like:
This error was appearing even in pages with no db calls. This makes me conclude that some weird thing is happening and calling the db but I cannot figure out what... I even isolated every file that calls the db so that files that contain a serverFn that calls the db ONLY contain server code but this still did not fix the issue. Anyone has any ideas on how to fix this?
Because i was seeing errors like:
This error was appearing even in pages with no db calls. This makes me conclude that some weird thing is happening and calling the db but I cannot figure out what... I even isolated every file that calls the db so that files that contain a serverFn that calls the db ONLY contain server code but this still did not fix the issue. Anyone has any ideas on how to fix this?