Closed aaronbushnell closed 1 year ago
Oh, I see what's happening here. Because these are console requests you wind up in a similar situation when you run...
php craft clear-caches/cp-resources
...if you don't have an explicit @webroot
alias set:
Clearing cache: Control panel resources
Error clearing cache Control panel resources: Unable to clear control panel resources because the location isn't known for console commands.
Explicitly set the @webroot alias in config/general.php to avoid this error.
See https://craftcms.com/docs/4.x/config/#aliases for more info.
If you find yourself in this boat you should just explicitly set @webroot
in your config. Here's mine:
'@webroot' => dirname(__DIR__).'/web',
Doing that will ensure cpresources
is placed appropriately when you run a console command like this!
I noticed that if I run
pest/test
it will create acpresources
in the root of my project. It could be because I need to make a config change on my end, but wasn't sure if that was a known issue!