What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: Issue Hosting Remix Shopify App – Need Proper Hosting Steps

Solved

Issue Hosting Remix Shopify App – Need Proper Hosting Steps

SwagKicks
Shopify Partner
4 1 0

Hello everyone,

I am currently working on hosting a Shopify app built using Remix, and I am facing issues with the hosting setup.

Setup Details:

  • I am using Heroku to host my app, and my app URL is: https://testdyno-99f8eee3322a.herokuapp.com/
  • In my environment variables, I have set the following:
    • SHOPIFY_API_KEY
    • SHOPIFY_API_SECRET_KEY
    • SCOPES
    • HOST (the same as my Heroku app URL)
    • SHOPIFY_APP_URL (again, matching the Heroku app URL)

The issue:

When I try to run the app in production, I get the following error:
(node:17548) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
[shopify-api/INFO] version 11.4.0, environment Remix
[shopify-app/INFO] Future flag wip_optionalScopesApi is disabled.
Enable this to use the optionalScopes API to request additional scopes and manage them.
Error: getaddrinfo ENOTFOUND https://testdyno-99f8eee3322a.herokuapp.com/
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)

Questions:

  1. Procfile Setup: In the Heroku Procfile, I currently have web: npm run start. Is this the correct command for a Remix Shopify app? Or is there a different command I should be using for hosting this app?

  2. SHOPIFY_APP_URL: For the SHOPIFY_APP_URL, should I be entering the same Heroku URL where my app is hosted (https://testdyno-99f8eee3322a.herokuapp.com/), or is there a different URL I should be using?

  3. Remix Hosting: Can anyone provide the correct steps or best practices for hosting a Remix Shopify app on Heroku (or any other platform)? I've been running into issues where npm run dev works perfectly in local development, but I can't figure out the right setup for production.

Any guidance would be greatly appreciated! Thank you.



Accepted Solution (1)

SwagKicks
Shopify Partner
4 1 0

This is an accepted solution.

Hey, I solved this issue by simply removing the HOST variable in the .env file. Everything is working fine now!

View solution in original post

Reply 1 (1)

SwagKicks
Shopify Partner
4 1 0

This is an accepted solution.

Hey, I solved this issue by simply removing the HOST variable in the .env file. Everything is working fine now!