Open NurramoX opened 1 year ago
I'm facing the same issue when using generate:pg
.
in the meantime i'm using out: path.relative(process.cwd(), '/absolute/path/to/config')
+1 still persists in latests version
drizzle-kit: v0.20.14
drizzle-orm: v0.30.6
in the meantime i'm using
out: path.relative(process.cwd(), '/absolute/path/to/config')
Thanks @mattfysh. This worked
drizzle-kit: v0.20.17
drizzle-orm: v0.30.10
I can confirm the issue persist and that, as noted above, @mattfysh's work around fixes the issue.
What version of
drizzle-orm
are you using?0.29.1
What version of
drizzle-kit
are you using?0.20.6
Describe the Bug
Issue: When using an absolute path in the
drizzle.config.ts
for theout
property, the first run ofdrizzle-kit generate:sqlite
completes successfully, generating the SQL migration file. However, any subsequent runs throw meError: ENOENT: no such file or directory, open './/home/ramzan/Projects/CDF/drizzle/meta/0000_snapshot.json'
Steps to Reproduce:
Define the
drizzle.config.ts
with an absolute path for theout
property:npx drizzle-kit generate:sqlite
. It executes correctly the first time.npx drizzle-kit generate:sqlite
again without changing any config.Expected behavior
Expected Behavior: The tool should recognize the absolute path on subsequent runs and correctly reference the generated
meta/0000_snapshot.json
file.Actual Behavior: The second run prepends an additional
./
to the absolute path, causing the file lookup to failEnvironment & setup