Why am I unable to deploy and host a Remix App?

Why am I unable to deploy and host a Remix App?

erik_lindberg_s
Shopify Partner
23 3 8

I have followed the "deploy your app" docu. https://shopify.dev/docs/apps/deployment/web after creating a blank remix app. I'm unable to deploy the app to fly, heroku and DigitalOcean. All returns same error.

 

-04-16 11:58:47] > start
[2024-04-16 11:58:47] > remix-serve ./build/server/index.js
[2024-04-16 11:58:47]
[2024-04-16 11:58:51]
[2024-04-16 11:58:51] /app/node_modules/@shopify/shopify-app-remix/build/cjs/server/shopify-app.js:98
[2024-04-16 11:58:51] throw new shopifyApi.ShopifyError('Invalid appUrl provided. Please provide a valid URL.');
[2024-04-16 11:58:51] ^
[2024-04-16 11:58:51] Error: Invalid appUrl provided. Please provide a valid URL.
[2024-04-16 11:58:51] at deriveApi (/app/node_modules/@shopify/shopify-app-remix/build/cjs/server/shopify-app.js:98:11)
[2024-04-16 11:58:51] at shopifyApp (/app/node_modules/@shopify/shopify-app-remix/build/cjs/server/shopify-app.js:49:15)
[2024-04-16 11:58:51] at file:///app/build/server/index.js?t=1713268522877.906:22:19
[2024-04-16 11:58:51] at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
[2024-04-16 11:58:51] at ModuleLoader.import (node:internal/modules/esm/loader:337:24)
[2024-04-16 11:58:51] at importModuleDynamicallyWrapper (node:internal/vm/module:432:15)
[2024-04-16 11:58:51] at run (/app/node_modules/@remix-run/serve/dist/cli.js:1

My .env file is empty and I have set the environment variables directly on every platform. 

Anyone knows whats going on here?

Replies 2 (2)
erik_lindberg_s
Shopify Partner
23 3 8

Thx for taking the time to answer. 

 

My initial thought was that I already tried that and that I had set the variable to SHOPIFY_APP_URL and not HOST when working in the local environment. But you were right. Setting the variable name to SHOPIFY_APP_URL and not HOST fixed it. At least on DibtialOcean.

Thx

EssDeeJay
Shopify Partner
7 0 3

Correct. This works for DigitalOcean Deployment. Mine worked even with placeholders such as https://www.google.com, so starting local server was not necessary I believe. 

Founder | Lead Developer @The SJ Development
Contact Us
Website | Email