error with drizzle-kit `introspect:pg` and `push:pg` | vercel postgres

drizzle.config.ts
import '@/drizzle/config'
import type { Config } from 'drizzle-kit';

export default {
schema: './drizzle/schema.ts',
out: './drizzle/migrations',
driver: 'pg',
dbCredentials: {
connectionString:process.env.POSTGRES_URL as string
},
} satisfies Config;
drizzle.config.ts
import '@/drizzle/config'
import type { Config } from 'drizzle-kit';

export default {
schema: './drizzle/schema.ts',
out: './drizzle/migrations',
driver: 'pg',
dbCredentials: {
connectionString:process.env.POSTGRES_URL as string
},
} satisfies Config;
@/drizzle/config.ts
import { loadEnvConfig } from "@next/env";

const projectDir = process.cwd();
loadEnvConfig(projectDir);
@/drizzle/config.ts
import { loadEnvConfig } from "@next/env";

const projectDir = process.cwd();
loadEnvConfig(projectDir);
is there anything wrong with these?? because when I run drizzle-kit introspect:pg I'm getting an error Error: Cannot find module 'drizzle-orm/pg-core' same error for drizzle-kit push:pg. below is my schema file if it helps:
schema.ts
import { integer, pgTable, timestamp, uuid } from "drizzle-orm/pg-core";

export const users = pgTable("users", {
id: uuid("id").primaryKey().defaultRandom(),
count: integer("count").notNull(),
createdAt: timestamp("created_at").defaultNow(),
});
schema.ts
import { integer, pgTable, timestamp, uuid } from "drizzle-orm/pg-core";

export const users = pgTable("users", {
id: uuid("id").primaryKey().defaultRandom(),
count: integer("count").notNull(),
createdAt: timestamp("created_at").defaultNow(),
});
No description
6 Replies
Naeemgg
NaeemggOP8mo ago
something was wrong with pnpm it worked with npm
Naeemgg
NaeemggOP8mo ago
No description
DoggeSlapper
DoggeSlapper8mo ago
Same issue with pnpm dlx something is off but didn't dig into
Mini
Mini4mo ago
Happening with me too, did you find anything @Naeem / @DoggeSlapper ?
❯ pnpm dlx drizzle-kit introspect
drizzle-kit: v0.23.0


Error please install required packages: 'drizzle-orm'
❯ pnpm dlx drizzle-kit introspect
drizzle-kit: v0.23.0


Error please install required packages: 'drizzle-orm'
works fine with npx
Naeemgg
NaeemggOP4mo ago
Nope I'm using pnpm as my primary package manager but instead of pnpx using npx is doing good with drizzle So yeah we don't have any official fix but a dirty one
Mini
Mini4mo ago
ah okay
Want results from more Discord servers?
Add your server