drizzle-kit not detecting tsconfig and getting path alias '~/'
When I try to default to a TS enum, drizzle-kit push fails when i run
drizzle-kit push:pg --config=drizzle.config.ts
If I just remove the .default(PDF_PARSE_STATUS.PENDING)
in my schema (but keep the import import { PDF_PARSE_STATUS } from '~/types';
), it will succeed
Here's my code:
schema.ts
types.ts
drizzle.config.ts
6 Replies
When you say it fails whats the error?
oh my god I forgot the most important piece of information lol
one sec let me get the error
Take a look at this thread https://github.com/drizzle-team/drizzle-orm/issues/1228
GitHub
[BUG]:
drizzle.config.ts
doesn't follow tsconfig.json
for modul...What version of drizzle-orm are you using? ^0.28.6 What version of drizzle-kit are you using? ^0.19.13 Describe the Bug if i import using '@/app/lib/env', it doesn't work but if i impor...
basically it can't detect the
types
file: Error: Cannot find module '~/types'
Somebody there offered a solution, but I just think that relative paths is the way to go
oh so basically just use the
--project
flag?
i guess for the schema file, i can use relative paths, feels cleaner
the rest of the app is already working with absolute paths, so should be just the one file