So, I'm making a Hydrogen App using the Vercel Template found here: https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fvercel%2Fvercel%2Ftree%2Fmain%2Fexamples%2Fhydrogen&template=hydrogen. It works perfectly fine with the default configuration.
hydrogen.config.ts
import {defineConfig, CookieSessionStorage} from '@shopify/hydrogen/config';
export default defineConfig({
shopify: {
defaultCountryCode: 'US',
defaultLanguageCode: 'EN',
storeDomain: 'hydrogen-preview.myshopify.com',
storefrontToken: '3b580e70970c4528da70c98e097c2fa0',
storefrontApiVersion: '2022-07',
},
session: CookieSessionStorage('\__session', {
path: '/',
httpOnly: true,
secure: import.meta.env.PROD,
sameSite: 'Strict',
maxAge: 60 \* 60 \* 24 \* 30,
}),
});
It creates a git repository and then it deploys it correctly as usual with any other Vercel Project.
However, when I change the storeFrontToken and storeDomain variables to the ones of my Shopify Store this appears on deployment.
I thought that there was something going on with the environment variables, so I hardcoded them and still nothing.
It works perfectly fine on localhost. I think it has something to do with the permissions of Shopify, or with GQL but still I'm not quite sure. Help.