In #391 a problem came to light when you freshly install Valet+, the stub for Elasticsearch isn't copied to the nginx direction when Valet+ is installed for the first time.
Possibly introduced in https://github.com/weprovide/valet-plus/commit/aa96089c067ebca092598f4f8a7cb9045a3bf36c. If /usr/local/etc/nginx/valet/elasticsearch.conf does not yet exist, it won't allow it to create it either, causing this bug on a fresh installation.
Why I say fresh is because if you uninstall Valet+, it won't delete the /usr/local/etc/nginx/valet/elasticsearch.conf, so reinstalling it afterwards won't cause the same bug.
I can confirm this. Removing include valet/elasticsearch.conf; from my nginx config will solve this issue (for now)
Hi @MikeYV,
Thank you for thinking about quick fixes so that others can continue working while we're trying to solve the problem.
You can find the stub under ~/.composer/vendor/weprovide/valet-plus/cli/stubs/elasticsearch.conf. What you can do is copy this file over to /usr/local/etc/nginx/valet/elasticsearch.conf and replace VALET_DOMAIN with the domain you're using (default is .test).
These commands worked for me:
sudo cp ~/.composer/vendor/weprovide/valet-plus/cli/stubs/elasticsearch.conf /usr/local/etc/nginx/valet/elasticsearch.conf
valet domain test
That automatically updated VALET_DOMAIN to the .test domain.
Question for you @Serializator : is the files->exists check necessary? It looks like that was very intentional in https://github.com/weprovide/valet-plus/commit/aa96089c067ebca092598f4f8a7cb9045a3bf36c. I was working on a PR to deal with that but I didn't want any unintended consequences of removing that check. If it's needed, maybe an argument to allow it to be created should be added.
Dear Contributor,
With the release of Valet+ 2.0.0 the Valet+ development team and contributors have implemented the contribution guidelines. The contribution guidelines aim to improve the support and workflow of Valet+. For further information why this was implemented please check https://github.com/weprovide/valet-plus/issues/393.
We're closing this ticket because it does not follow the correct format. If you feel your ticket is still relevant we encourage you to re-open your ticket using the correct format.
Kind regards,
The Valet+ team
Most helpful comment
These commands worked for me:
That automatically updated
VALET_DOMAINto the.testdomain.Question for you @Serializator : is the
files->existscheck necessary? It looks like that was very intentional in https://github.com/weprovide/valet-plus/commit/aa96089c067ebca092598f4f8a7cb9045a3bf36c. I was working on a PR to deal with that but I didn't want any unintended consequences of removing that check. If it's needed, maybe an argument to allow it to be created should be added.