Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Running artisan view:cache throws exception DirectoryNotFoundException #33

Closed
illambo opened this issue Jan 8, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@illambo
Copy link

illambo commented Jan 8, 2021

Describe the bug
Run php artisan view:cache generate Symfony\Component\Finder\Exception\DirectoryNotFoundException

To Reproduce
Steps to reproduce the behavior:

php artisan view:cache
Compiled views cleared!

   Symfony\Component\Finder\Exception\DirectoryNotFoundException 

  The "[hidden-project-path]/vendor/joelbutcher/socialstream/src/../resources/views" directory does not exist.

  at vendor/symfony/finder/Finder.php:589
    585▕             } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0) | \GLOB_ONLYDIR | \GLOB_NOSORT)) {
    586▕                 sort($glob);
    587▕                 $resolvedDirs = array_merge($resolvedDirs, array_map([$this, 'normalizeDir'], $glob));
    588▕             } else {
  ➜ 589▕                 throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir));
    590▕             }
    591▕         }
    592▕ 
    593▕         $this->dirs = array_merge($this->dirs, $resolvedDirs);

      +17 vendor frames 
  18  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Expected behavior
Ability to cache views.

Environment context

  • Socialstream version: 1.1.1
  • Jetstream stack: Livewire
  • Laravel version: 8.21.0
  • PHP version: 7.4.12
@illambo illambo added the bug Something isn't working label Jan 8, 2021
@joelbutcher
Copy link
Owner

Hi @illambo please consult the Laravel documentation on the cache:clear artisan command.

My solution to this for you and anyone with this issue, would be to manually create the directory and then run the command.

@illambo
Copy link
Author

illambo commented Jan 8, 2021

I'm sorry "the insistence" but I don't understand, the problem is not given by cache:clear but by view:cache and seems related to the vendor.
Do you have any advice on this ?
Thanks

@joelbutcher
Copy link
Owner

joelbutcher commented Jan 8, 2021

Hi @illambo Sorry, I meant view:cache. Digging a little deeper, I've found the issue - updating to 1.1.2 should fix this.

@illambo
Copy link
Author

illambo commented Jan 8, 2021

Super and very kind too! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants