code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'

i'm trying to start a new project using pnpm and create-t3-app. initial setup goes fine, but once i've linked up with an awake, free-tier, planetscale db and try to run pnpm db:push, an alias for dotenv drizzle-kit push:mysql, i get the following error. i have tried downgrading drizzle-kit to ^0.19.3 as suggested in this thread https://discord.com/channels/1043890932593987624/1188413169668980768/1188647000707694622, which seems to be about a similar issue to mine, but to no avail. any help is greatly appreciated JinxHeart terminal output for good measure:
pnpm db:push

> [email protected] db:push /home/tsuki/projects/tsudo-v3
> dotenv drizzle-kit push:mysql

node:internal/modules/cjs/loader:597
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './relations' is not defined by "exports" in /home/tsuki/projects/tsudo-v3/node_modules/drizzle-orm/package.json
at exportsNotFound (node:internal/modules/esm/resolve:302:10)
at packageExportsResolve (node:internal/modules/esm/resolve:649:9)
at resolveExports (node:internal/modules/cjs/loader:590:36)
at Module._findPath (node:internal/modules/cjs/loader:667:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1129:27)
at Module._load (node:internal/modules/cjs/loader:984:27)
at Module.require (node:internal/modules/cjs/loader:1234:19)
at require (node:internal/modules/helpers:176:18)
at src/introspect-pg.ts (/home/tsuki/projects/tsudo-v3/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:18942:24)
at __init (/home/tsuki/projects/tsudo-v3/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:9:56) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
pnpm db:push

> [email protected] db:push /home/tsuki/projects/tsudo-v3
> dotenv drizzle-kit push:mysql

node:internal/modules/cjs/loader:597
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './relations' is not defined by "exports" in /home/tsuki/projects/tsudo-v3/node_modules/drizzle-orm/package.json
at exportsNotFound (node:internal/modules/esm/resolve:302:10)
at packageExportsResolve (node:internal/modules/esm/resolve:649:9)
at resolveExports (node:internal/modules/cjs/loader:590:36)
at Module._findPath (node:internal/modules/cjs/loader:667:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1129:27)
at Module._load (node:internal/modules/cjs/loader:984:27)
at Module.require (node:internal/modules/cjs/loader:1234:19)
at require (node:internal/modules/helpers:176:18)
at src/introspect-pg.ts (/home/tsuki/projects/tsudo-v3/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:18942:24)
at __init (/home/tsuki/projects/tsudo-v3/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:9:56) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
1 Reply
tsuki
tsukiOP11mo ago
upgrading drizzle-orm to version ^0.29.2 seems to have resolved the issue
Want results from more Discord servers?
Add your server