Typescript error that doesn't make a whole lot of sense when calling db.select or db.insert
This is my account model
This issue happens to both my db.insert and db.select requests. Any guidance would be much appreciated.
15 Replies
eq() should get column as first param
And value for it as second
Thanks for that @Andrew Sherman , the original issue with accounts didn't go away unfortunately
Can you please show part where you create db from drizzle()
And where did you import drizzle from
^ this is the db.ts file
Then in my accounts file I have
version: "drizzle-orm": "^0.23.13"
let me test it locally
so It works for me
could you please send your table schema + imports for it and
nanoId
implementation?
maybe something wrong there
because everything else was taken from you exampleaccounts.ts
table.ts
nanoid
I believe that should be everything
yes
thanks
still works
another question
do you have 1 drizzle-orm installed?
or are you using monorepo and having several drizzle-orm instances?
I am using monorepo but I only have
drizzle-orm
only in 1 package.json
whelp, other than it looking ugly in my IDE it's not preventing my code from executing so it's fine for now I guess
Thanks for looking into it @Andrew Shermanit shouldn't be this way
let me try a different IDE
I guess you can try installing drizzle-orm globally in monorepo to check if it will work
but if you have only 1 drizzle-orm installed - no errors should be displayed
Very intersting, doesn't happen on Vscode
Oh damn, I restarted my webstorm IDE and now the error is also gone.
I dunno how it worked but it did
Thanks again @Andrew Sherman
🫡