Sapphire stops working when deployed to Heroku
The client still logs in but none of the commands are registered. I'm not familiar enough with sapphire to debug this myself, could someone suggest how I can debug the problem?
Solution:Jump to solution
Part 1 https://sapphirejs.dev/docs/Guide/additional-information/registering-custom-paths-for-a-store
Part 2 https://sapphirejs.dev/docs/Guide/additional-information/registering-virtual-pieces...
Sapphire Framework
Registering custom paths for a store | Sapphire
While Sapphire sets specific folder names for the stores, you may want to use different folder names. Sapphire enables
Sapphire Framework
Registering and loading virtual pieces | Sapphire
Virtual pieces differ from normal pieces in that they are not loaded from the file system. Instead, they are registered
12 Replies
Additionally, it seems sapphire is looking for commands but can't find any.
Where are your command files located
Heroku doesn't really work with file system dependent frameworks. Heroku will also kill your application after some time unless you constantly ping the endpoint to keep it alive which in turn is against ToS and will get your application banned. We recommend getting a VPS (Virtual Private Server)
Affordable hosting providers:
• Netcup Starting at €2.62/mo for 1 core, 2GB RAM, 20GB SSD (You can get a totally free 10% discount code from @kyra 🩵🩷🤍🩷🩵 or @Favna!)
• OVH Starting at $3.35/mo for 1 core, 2GB RAM, 20GB SSD
• DigitalOcean Starting at $5/mo for 1 core, 1GB RAM, 25GB SSD
• Linode Starting at $5/mo for 1 core, 1GB RAM, 25GB SSD
• Vultr Starting at $2.50/mo for 1 core, 512MB RAM, 10GB SSD
• AWS Lightsail Starting at $3.50/mo (first month free) for 1 core, 512MB RAM, 20GB SSD
• Time4VPS Starting at €3.99/month for 1 core, 2GB RAM, 20GB SSD
• VIRMACH Full Windows and Linux Desktop VPS starting at $7/mo and $1/mo respectively
• GitHub education Free credit and other offers for students
• Microsoft students Free credit for students
• Google Cloud free tier
• Wither Hosting Starting at $4 a month for 1 core, 2GB ram, 25GB NVME storage.
• Contabo Starting at €4.99/mo for 4 cores, 8GB RAM, 50GB SSD (5€ setup fee)
Is it at all possible to resolve this thought? i.e. could I specify a differnt path to the sapphire client?
Maybe, idk, I haven't used heroku in over 5 years because I've known how bad it is.
Oracle offers free VMs. We need to add it to the list.
is it possible to specify a different path just generally as I wanted to rearrange the folders locally but I can't find any documentation about it
actually.. is there a way I can just manually regiser each command?
Solution
Part 1 https://sapphirejs.dev/docs/Guide/additional-information/registering-custom-paths-for-a-store
Part 2 https://sapphirejs.dev/docs/Guide/additional-information/registering-virtual-pieces
Sapphire Framework
Registering custom paths for a store | Sapphire
While Sapphire sets specific folder names for the stores, you may want to use different folder names. Sapphire enables
Sapphire Framework
Registering and loading virtual pieces | Sapphire
Virtual pieces differ from normal pieces in that they are not loaded from the file system. Instead, they are registered
Your commands folter must be lowercase
To rename it to lowercase, you'll have to rename it as something else (e.g. "c") and then "commands"
or use
git mv
, always works that way :mmLol:
or mv
from shellThank you this solved my issue