Drizzle tries to import mysql2/promise even though I want to use postgress.
I got:
~~~~
I installed drizzle with:
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';
npm i drizzle-orm postgres
npm i -D drizzle-kit
7 Replies
and lot of other similar failures. Somehow it tries to import mysqlcore
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 ...
Try adding
"skipLibCheck": true
to your tsconfig.jsonYeah, It gets error skipped but definety not the right solution
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
I use that as reference
https://www.totaltypescript.com/tsconfig-cheat-sheet
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.
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