DT
Drizzle Team•14mo ago
Olli

Drizzle tries to import mysql2/promise even though I want to use postgress.

I got: node_modules/drizzle-orm/mysql-core/db.d.ts:1:38 - error TS2307: Cannot find module 'mysql2/promise' or its corresponding type declarations. 1 import type { ResultSetHeader } from 'mysql2/promise'; ~~~~ I installed drizzle with: npm i drizzle-orm postgres npm i -D drizzle-kit
7 Replies
Olli
OlliOP•14mo ago
and lot of other similar failures. Somehow it tries to import mysqlcore
Olli
OlliOP•14mo ago
GitHub
[BUG]: Many TypeScript Compile Errors (drizzle-orm/neon-http ; Post...
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 During the build step for Typescript, I run into the same "10 errors in ...
Angelelz
Angelelz•14mo ago
Try adding "skipLibCheck": true to your tsconfig.json
Olli
OlliOP•14mo ago
Yeah, It gets error skipped but definety not the right solution
rphlmr âš¡
rphlmr ⚡•14mo ago
Hum I think it is because your typescript project will never build if you check all node modules ts errors 😬 This is a total mess without skipLibCheck
rphlmr âš¡
rphlmr ⚡•14mo ago
Total TypeScript
The TSConfig Cheat Sheet
Learn the essential TypeScript configuration options and create a concise tsconfig.json file for your projects with this helpful cheatsheet.
Angelelz
Angelelz•14mo ago
Drizzle includes the types for all the drivers it supports. The errors you see are there because you don't have those other drivers installed, so TS cannot find those type declarations You could install those other libraries you don't need just to please the compiler or skipLibCheck
Want results from more Discord servers?
Add your server