How to I set the location folder of Control Panel resources? I'm trying to use the ./craft clear-caches/all CLI command.

Everything is working fine, except that I always get this error:


  Error clearing cache Control Panel resources: Unable to clear Control
  Panel resources because the location isn't known for console commands.


How can I set this resources folder?
Thank you @Brandon Kelly for the solution:


  That’s because @webroot is only reliable on web requests. To fix,
  update your resourceBasePath config setting to a real path:
  
  'resourceBasePath' =&gt; dirname(__DIR__) . '/web/cpresources'