[Bug]: `herd link` does not create a new site anymore
Platform
macOS
Operating system version
macOS 15.0 (24A335)
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.11.0 (Build: 33)
PHP Version
PHP 8.3.12
Bug description
I cannot create a site anymore using herd link.
Steps to reproduce
❯ herd link
A [my-site] symbolic link has been created in [/Users/oliver/Library/Application Support/Herd/config/valet/Sites/my-site].
This command creates a symlink, but no site has been added to the Sites overview, and you can't unlink or access the site.
❯ herd unlink
In Site.php line 30:
my-site is not linked.
unlink [<name>]
It seems that also the Sites UI can't create a site anymore. This is the log output:
link [--secure] [--isolate ISOLATE] [--] [<name>]
In Site.php line 184:
The [my-site] site could not be found in Valet's
site list.
A [my-site] symbolic link has been created in [/Users/oliver/Library/Application Support/Herd/config/valet/Sites/my-site].
Can you share a screenshot of the "General" tab in your Herd settings, showing the "Herd paths"?
Yep, sure!
Could you please remove one of the paths to the Sites Valet folder? I wonder if this causes the issue for whatever reason 🤔
Could you please remove one of the paths to the Sites Valet folder? I wonder if this causes the issue for whatever reason 🤔
That didn’t help. I noticed that the symlink for the site my-site already existed (probably a left over from Valet?). That might have caused the issue. I manually deleted the symlink from the path, and then everything worked fine. Maybe herd link could just delete the symlink first before proceeding to create the Site to avoid this issue.
P.S semi related to this issue - if you delete or rename a folder from your Mac that is linked in the paths added via the UI it cannot be removed via the UI. Additionally you get a valet related error when accessing any sites.
I'll close this issue as the original issue was resolved.
herd link will delete any existing link if there is already an existing one in the next version.
@mpociot To clarify, this removes only the link with the same name that I’m trying to add with herd link – not all links added for the given directory? So multiple domains can still be linked to the same application?