Issue summary
Before opening this issue, I have:
- [ x] Upgraded to the latest version of the relevant packages
@shopify/* package and version: 8.0.1
- Node version:
- Operating system:
- [x ] Set
{ logger: { level: LogSeverity.Debug } } in my configuration, when applicable
- [ x] Found a reliable way to reproduce the problem that indicates it's a problem with the package
- [ x] Looked for similar issues in this repository
- [ x] Checked that this isn't an issue with a Shopify API
shopify-app-session-storage-prisma gives an error with the newer versions of the package when I'm in a monorepo situation where the Prisma files are in a shared monorepo package that is imported into the app.
I've downgraded back to version 4.0.5 and everything still works as expected
Expected behavior
It should work as it did before, without throwing
Actual behavior
App crashes and throws:
TypeError: Right-hand side of 'instanceof' is not an object
at PrismaSessionStorage.storeSession (/app/node_modules/@shopify/src/prisma.ts:74:14)
Steps to reproduce the problem
- Create Shopify RR7 app in monorepo
- Place Prisma client in a shared package
- Import the built shared Prisma Client
- Use that Prisma Client in the
sessionStorage: new PrismaSessionStorage(prisma),
Debug logs
TypeError: Right-hand side of 'instanceof' is not an object
at PrismaSessionStorage.storeSession (/app/node_modules/@shopify/src/prisma.ts:74:14)
at Object.authenticate (file:///app/node_modules/@shopify/src/server/authenticate/admin/strategies/token-exchange.ts:113:7)
at Object.authenticateAdmin [as admin] (file:///app/node_modules/@shopify/src/server/authenticate/admin/authenticate.ts:172:23)
at loader$e (file:///app/apps/web/build/server/index.js:1552:7)
at callRouteHandler (file:///app/node_modules/react-router/dist/development/chunk-4LKRSAEJ.mjs:509:16)
at commonRoute.loader (file:///app/node_modules/react-router/dist/development/chunk-4LKRSAEJ.mjs:659:19)
at file:///app/node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs:4756:19
at callLoaderOrAction (file:///app/node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs:4808:16)
at async Promise.all (index 0)
at defaultDataStrategy (file:///app/node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs:4433:17)
Issue summary
Before opening this issue, I have:
@shopify/*package and version: 8.0.1{ logger: { level: LogSeverity.Debug } }in my configuration, when applicableshopify-app-session-storage-prismagives an error with the newer versions of the package when I'm in a monorepo situation where the Prisma files are in a shared monorepo package that is imported into the app.I've downgraded back to version
4.0.5and everything still works as expectedExpected behavior
It should work as it did before, without throwing
Actual behavior
App crashes and throws:
Steps to reproduce the problem
sessionStorage: new PrismaSessionStorage(prisma),Debug logs