Issues with migrating to newest version of app-bridge-react when using Shopify's Node Template

Issues with migrating to newest version of app-bridge-react when using Shopify's Node Template

triplesingle
Shopify Partner
22 0 1

I am currently building an app with Shopify's default Node and React template (Link: https://github.com/Shopify/shopify-app-template-node)

This template uses Version 3.7.7 of app-bridge-react and I am trying to migrate to 4.1.3 and am currently following the docs as listed here (Link: https://shopify.dev/docs/api/app-bridge/migration-guide#step-2-upgrade-your-shopify-app-bridge-react....

 

I can see that app-bridge-react in my node modules is already 4.1.3 and I have already included the below script in the head within my index.html file:

<meta name="shopify-api-key" content="MY_API_KEY" />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>

However, when I remove Shopify's default AppBridgeProvider from my App.jsx I get the below error:

Uncaught Error: No AppBridge context provided. Your component must be wrapped in the <Provider> component from App Bridge React.

Just wondering if anyone has ever encountered this issue before?
Replies 0 (0)