Hi everyone,
I’m working on a custom Node.js Shopify app, and I’m completely stuck with this issue.
Environment:
- Node.js v22.16.0
@shopify/shopify-api
version: 11.13.0- Clean environment, no leftover processes or conflicting versions
Problem:
Following the official documentation and multiple community threads, I’ve tried importing InMemorySessionStorage
like this: const { shopifyApi, LATEST_API_VERSION, InMemorySessionStorage } = require(‘@shopify/shopify-api’);
And initializing it in my shopifyApi
config: sessionStorage: new InMemorySessionStorage()
But I keep getting this error: TypeError: InMemorySessionStorage is not a constructor
I’ve also tried:
- Importing as
MemorySessionStorage
- Using
require('@shopify/shopify-api').session.MemorySessionStorage
- Using
require('@shopify/shopify-api').session.InMemorySessionStorage
None of these work always the same error about it not being a constructor or undefined.
Can anyone confirm the correct, supported way to initialize session storage in v11.13.0** of @shopify/shopify-api
?
If there is an updated example or repo reference, I would really appreciate it.
Thank you so much in advance. Im open to downgrading the package if that’s the only way, but I’d prefer to stay on v11 if possible.