CharlesCharlieCharles
CharlesCharlieCharles
DTDrizzle Team
Created by CharlesCharlieCharles on 11/13/2023 in #help
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]
I'm getting the following error using node / nodemon / ts-node. Just started happening, never had this issue before:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './index' is not defined by "exports" in /Users/bob/Public/Code/api_node/node_modules/drizzle-orm/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
at resolveExports (node:internal/modules/cjs/loader:493:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:533:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/bob/Public/Code/api_node/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './index' is not defined by "exports" in /Users/bob/Public/Code/api_node/node_modules/drizzle-orm/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
at resolveExports (node:internal/modules/cjs/loader:493:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:533:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/bob/Public/Code/api_node/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Studio is working and drizzle kit push successfully created the db any ideas? Thanks
2 replies
DTDrizzle Team
Created by CharlesCharlieCharles on 11/11/2023 in #help
get last inserted id with mysql
noob question, but what is the preffered way to get the last inserted id using mysql? const data = await db.insert(brand).values(brandInsert) const lastId = ?? thanks?
4 replies
DTDrizzle Team
Created by CharlesCharlieCharles on 10/26/2023 in #help
It seems that the libsql server is outdated
I'm sporadically getting this issue whilst connecting with turso. Sometimes call is successful and sometimes I get following error. Not sure if this is drizzle or turso issue LibsqlError: SERVER_ERROR: Server returned HTTP status 404. It seems that the libsql server is outdated, please try updating the database. at mapHranaError (/Users/rob/Public/Code/api_node/node_modules/@libsql/client/lib-cjs/hrana.js:287:16) at HttpClient.execute (/Users/rob/Public/Code/api_node/node_modules/@libsql/client/lib-cjs/http.js:84:48) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async PreparedQuery.all (/Users/rob/Public/Code/api_node/node_modules/src/libsql/session.ts:223:16)
1 replies
DTDrizzle Team
Created by CharlesCharlieCharles on 10/24/2023 in #help
inferring the column information from the imported schema
is there anyway to get the column information from the imported schema information. When I dump the schema I can see that there is [Symbol(drizzle:Columns] property but not sure how I'd access it. Does drizzle provide some sort of API for extracting this data?
6 replies