ndimatteo/HULL

Error: "Unavailable Shop" in dev after changing to a new Shop URL in env variables

ansmlc opened this issue · 2 comments

When running npm run dev I get this error after the site is compiled. Only happens locally. When deployed to production (Vercel), there is no error.

This started happening after I switched the a different Shopify Shop. I changed all the .env.local. accordingly. It seems like the live Vercel build is recognizing the new env variables, while locally it still tries to use the old Shop URL, which is no longer available.

image

Unhandled Runtime Error
Error: "Unavailable Shop"

Call Stack
eval
node_modules\shopify-buy\index.js (3847:0)

When looking in DevTools, console tab, I get this:
XXXXX is the OLD Shopify Shop name, even though I changed it in .env.local.

POST https://XXXXX.myshopify.com/api/2022-01/graphql 402
Uncaught (in promise) Error: "Unavailable Shop"
    at eval (index.js?c443:3847:1)

When looking at the live URL on Vercel, it shows the new Shopify URL as it shoul.

My mistake. I had two different instances of HULL running locally.

Glad you were able to figure it out! I've been there!