Basic config problems - can't get Drizzle to start
I'm using Next.js, Postgres Vercel and Drizzle on a new project. First, I followed a tutorial and it seemed to be workig, up until I tried to implement UUIDs.
So I started from scartch and, since I didn't like the file structure in the tutorial, I decided to change it to fit my own standards. Now I'm getting path problems, even though I've triple-chcked to confirm the file is at the specified location.
My folder structure is as follows (see screenshots):
1. drizzle.config.ts: src/backend/database/drizzle/drizzle.config.ts
2. config.ts: src/backend/database/drizzle/config.ts
3. db: src/backend/database/drizzle/db.ts
4. schema.ts: src/backend/database/schema/schema.ts
when I run :
npx drizzle-kit generate:pg --config ./src/backend/database/drizzle/drizzle.config.ts
I get this error. "
drizzle-kit: v0.20.14
drizzle-orm: v0.29.4
Reading config file 'C:\03 Programação\999 Projetos\03-solutioner-2.0\src\backend\database\drizzle\drizzle.config.ts'
Err: No schema files found for path config ['/src/backend/database/schema/schema.ts']
Err: If path represents a file - please make sure to use .ts or other extension in the path
"
What's going on? Can anyone offer help?
Any guidance would be greatly appreciated.
Thanks in advance!





3 Replies
Hello @nr7751! Could you try to change paths to migrations folder and schema in config?
@solo , thanks!
It worked. What's the deal here? "./" stands for the project's root folder in this case?
sorry for late response
./path
is a relative path
/path
is an absolute path
relative path depends on the current directory, while absolute path starts from the root of the file system