Server side library running on client
I am trying to do this:
But in my browser, I am getting an error:
Clicking the
cli-options link shows that the dotenv library is being executed on the client I was taking a look at this repo:
https://github.com/aaronksaunders/tanstack-start-drizzle-app/tree/main
He does the same as I do except that his database file path is hardcoded
https://github.com/aaronksaunders/tanstack-start-drizzle-app/blob/e867a96e3e1097018c64b7f9cccf93d34b1b6c9d/drizzle/db.ts#L10C1-L11C17
... So my question would be, how am I supposed to "split" the server side code and the client one in this case? I have to import my db variable to be used in the server functions