Shopify / Shopify/shopify-app-template-php
Hostname env.HOST not_defined
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 340
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
The HOST environmental variable is null when running npm run dev on some systems.
I can't for the life of me figure out why it happens, but it only happens on some systems, and when it happens, it always happens consistently on those systems.
As a result, the laravel app doesn't really work at all and the app inside shopify doesn't show anything.
I've followed the instructions to the letter in 3 macOs and 5 or 6 linux installations, with the latest node and php versions. It only worked in 1 mac and 1 linux instance.
The same exact project files also only work on these installations.
The iframe src inside shopify points to the new tunnel address, however the page itself is errored and invisible.
I'm really new to both Laravel and node/vite, so I can't really figure out where or why things are going wrong.
Works in:
Mac VM (UTM)
Debian (Parallels)
Doesn't work in:
Mac (baremetal)
Mac VM (Parallels)
Debian (UTM)
Fedora (Parallels)
All VMs were vanilla installations and had shared networking with the base M1 Pro machine.
Any help or ideas on how I could go abount hunting this issue down, would be greatly appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at web/app/Providers/AppServiceProvider.php line 37 and reproduce the HOST behavior with npm run dev on the listed macOS and Linux setups. Compare the environments where HOST is null with those where it works, then verify that the tunnel address and embedded Shopify page render successfully once the issue is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, node.js, php
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100