Module not found: Can't resolve 'path' with Hono Drizzle
The Error
The issue is somewhere either in this file
This file may help
@/db/drizzle.ts
21 Replies
What run-time are you using? Do you have dotenv installed properly?
I'm using bun and yes I have dotenv installed
For bun you don’t need dotenv and you use process.env or Bun.env directly
I’m not sure if that will fix the issue
nope
To confirm you removed that import and dotenv package and it did not fix it?
Yes I did that. But I ran into this
What is this running on?
next js, ms edge, arch linux
Wait so are you using Cloudflare libs in nextjs?
I wasn't intending to
I just did a basic installation
Cloudflare libs will only work in cloudflare runtimes like cloudflare pages and workers. Which docs did you follow? Can you point me to them so that I can cross check if this is the issue
I would suggest you to follow the vercel and nextjs docs for setting things up
I did that and that runs into this issue now
I followed the official supabase and drizzle docs
Just install the crypto package that should resolve this
Can you share the link?
Man I'm honestly tired of all this. So sick of grinding and not getting a job and facing rejections daily. I don't even see the point in building this project cuz I know I still won't get hired
Wait
Supabase
Connecting to your database | Supabase Docs
Explore the options for connecting to your Postgres database.
Drizzle ORM - Drizzle with Supabase Database
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
This is something outside my scope of work, but just relax and take a break. Everyone is low at some point, I am too on a daily basis (biggest con of being a programmer). Just try to remember what all have you accomplished and start with a fresh mind. Relax everything will turn out good in the end.
I will go through these and check why these issues might have been occurring.
Found the fix
I was running it on edge which Supabase doesn't support. I changed it to nodejs and it worked
Please mark this as solved, thank you