TypeError: createApp is not a function

Manthan
Shopify Partner
10 0 3
import createApp from "@shopify/app-bridge"
 
const myApp = createApp({
  apiKey: 'api-key',
  shopOrigin: 'shopOrgin',
});
 
Please solve this issue. createApp is not a function
Replies 6 (6)

CharlieD
Shopify Staff
15 4 7

Hi @Manthan 👋

What version of @shopify/app-bridge are you using?

Thanks!

To learn more visit the Shopify Help Center or the Community Blog.

Manthan
Shopify Partner
10 0 3

Thanks, @CharlieD  for your reply, but the issue is solved.

CharlieD
Shopify Staff
15 4 7

Awesome, glad to hear!

To learn more visit the Shopify Help Center or the Community Blog.

peepers-rick
Shopify Partner
6 0 5

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.

devEkma
Shopify Partner
2 0 1

I've got the newest version of app-bridge and the same issue.

There is the opportunity to use development library instead: 

https://shopify.dev/docs/apps/tools/app-bridge/debugging

 

 

 

Manthan
Shopify Partner
10 0 3

Sorry for the late reply, I just added the braces like this - import {createApp} from "@shopify/app-bridge"