Next.js App Bridge update and host parameter

Hi,
I have a Shopify app built with the next.js framework using the old Shopify CLI. I am trying to update the Shopify app bridge libraries and the host parameter but it says “location is not defined”. Is there any solution to fix this issue?

We are doing this to ensure compatibility with the new Shopify admin domain. According to the docs we need to update the host parameter.

https://shopify.dev/docs/apps/tools/app-bridge/getting-started/app-setup#initialize-shopify-app-bridge-in-your-app

2 Likes