import createApp from “@shopify/app-bridge”
const myApp = createApp({
apiKey: ‘api-key’,
shopOrigin: ‘shopOrgin’,
});
Please solve this issue. createApp is not a function
A user encountered a TypeError: createApp is not a function when importing from @shopify/app-bridge.
Resolution:
The issue was solved by correcting the import syntax to use named imports with braces: import { createApp } from "@shopify/app-bridge" instead of a default import.
Additional Context:
import createApp from “@shopify/app-bridge”
const myApp = createApp({
apiKey: ‘api-key’,
shopOrigin: ‘shopOrgin’,
});
Please solve this issue. createApp is not a function
Thanks, @CharlieD for your reply, but the issue is solved.
Awesome, glad to hear!
How did you solve it? I’m running in to the same issue. My code looks almost exactly the same as yours. It works when I run it locally but when I deploy it to fly.io I’m running into that issue.
I’ve got the newest version of app-bridge and the same issue.
There is the opportunity to use development library instead:
Sorry for the late reply, I just added the braces like this - import {createApp} from “@shopify/app-bridge”