I am working with "shopify" and "nodejs",Right now i am trying to integrate "shopify module" in nodejs,But i am getting following error
"ShopifyError: Cannot initialize Shopify API Library. Missing values for: hostName"
Here is my config.js code (node_modules/@shopify/shopify-api/lib/config.js",Is this hostname right or where can i get hostname ? why i am getting error "missing hostname" ?
var config = {
apiKey: '',
apiSecretKey: '',
scopes: new scopes_1.AuthScopes([]),
hostName: 'https://partners.shopify.com/xxxxx/stores',
hostScheme: 'https',
apiVersion: types_1.LATEST_API_VERSION,
isEmbeddedApp: true,
isPrivateApp: false,
logger: {
log: defaultLogFunction,
level: types_1.LogSeverity.Info,
httpRequests: false,
timestamps: false,
},
};
I had a this issue when attempting npm run serve
(the default command for production environment with their Docker configuration). In my case, the .env was missing a HOST
field.
Shopify Docs say HOST
is required. This was tricky to diagnose because:
HOST
to hostName
in their codeIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With