[BUG]: drizzle-kit add "./" prefix on generate
when given absolute path (resolve and __dirname)
#3807
Labels
generate
when given absolute path (resolve and __dirname)
#3807
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.38.2
What version of
drizzle-kit
are you using?0.30.1
Other packages
No response
Describe the Bug
When doing
drizzle-kit generate
it will give out anENOENT
error, which is actually correct but it is correct because drizzle-kit somehow prepend a migration meta file path with./
here's the output of the error:
as you can see the
path
is actually "correct" and pointing to the actual existing1734596738_snapshot.json
file, however the whole path is prepended by./
which makes it invalid and in turn causing drizzle-kit or rather OS unable to find the fileHappened on
macOS 15.1.1 (24B91) Apple M1
will also test on my Linux machine laterThe content of
config.ts
:Update:
I think more specifically, it is caused when the path to migration path is given as an absolute path, either raw__dirname
/ string concatination or usingresolve
path function, however when using a workaround on the comment below, which is usingrelative
path function, it works as expectedThis actually messed up some migration generation
The text was updated successfully, but these errors were encountered: