The "" directory does not exist

I’m running windows 10 with wsl2 and using Ubuntu 20.04LTS as my distro.

I installed all requirements listed on roots.io for Bedrock, Acorn and Sage and everything is working except for when I go to activate the sage theme. Its throws a DirectoryNotFoundException

Code on line 82 from /vendor/roots/acorn/src/Acorn/Bootstrap/LoadConfiguration.php

$files = [];

        $configPath = realpath($app->configPath());

        foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {
            $directory = $this->getNestedDirectory($file, $configPath);

            $files[$directory . basename($file->getRealPath(), '.php')] = $file->getRealPath();
        }

        ksort($files, SORT_NATURAL);

        return $files;
PHP Fatal error:  Uncaught Symfony\Component\Finder\Exception\DirectoryNotFoundException: The "" directory does not exist. in \vendor\symfony\finder\Finder.php:592
Stack trace:

#0 \vendor\roots\acorn\src\Acorn\Bootstrap\LoadConfiguration.php(82): Symfony\Component\Finder\Finder->in(false)
#1 \vendor\roots\acorn\src\Acorn\Bootstrap\LoadConfiguration.php(57): Roots\Acorn\Bootstrap\LoadConfiguration->getConfigurationFiles(Object(Roots\Acorn\Application))
#2 \vendor\roots\acorn\src\Acorn\Bootstrap\LoadConfiguration.php(35): Roots\Acorn\Bootstrap\LoadConfiguration->loadConfigurationFiles(Object(Roots\Acorn\Application), Object(Illuminate\Config\Repository))
#3 \vendor\roots\acorn\src\Acorn\Concerns\Application.php(560): Roots\Acorn\Bootstrap\LoadConfiguration->bootstrap(Object(Roots\Acorn\Application))
#4 D:\Sites\balanced.wpdev.me\bedrock\vendor\roots\acorn\src\Ac in D:\Sites\balanced.wpdev.me\bedrock\vendor\symfony\finder\Finder.php on line 592
1 Like

Hello, i have the same problem, can you found the solution please?

Same problem on a fresh bedrock + sage installation.
When I choose sage theme on wordpress this is the error that appers

Fatal error : Uncaught Symfony\Component\Finder\Exception\DirectoryNotFoundException: The “” directory does not exist. in /home/testwp/www/vendor/symfony/finder/Finder.php:592 Stack trace: #0 /home/testwp/www/vendor/roots/acorn/src/Acorn/Bootstrap/LoadConfiguration.php(82): Symfony\Component\Finder\Finder->in() #1 /home/testwp/www/vendor/roots/acorn/src/Acorn/Bootstrap/LoadConfiguration.php(57): Roots\Acorn\Bootstrap\LoadConfiguration->getConfigurationFiles() #2 /home/testwp/www/vendor/roots/acorn/src/Acorn/Bootstrap/LoadConfiguration.php(35): Roots\Acorn\Bootstrap\LoadConfiguration->loadConfigurationFiles() #3 /home/testwp/www/vendor/roots/acorn/src/Acorn/Concerns/Application.php(560): Roots\Acorn\Bootstrap\LoadConfiguration->bootstrap() #4 /home/testwp/www/vendor/roots/acorn/src/Acorn/Bootloader.php(116): Roots\Acorn\Application->bootstrapWith() #5 /home/testwp/www/vendor/roots/acorn/src/Acorn/Bootloader.php(89): Roots\Acorn\Bootloader->app() #6 /home/testwp/www/web/wp/wp-includes/class-wp-hook.php(307): Roots\Acorn\Boot in /home/testwp/www/vendor/symfony/finder/Finder.php on line 592

Resolved upgrading roots/acorn to version 2 on bedrock composer.json

composer require -W roots/acorn ^2.0

2 Likes

Thanks for your answer , I get rid of the problem ,
but now I am getting this problem instead :
**Fatal error** : Cannot redeclare Roots\asset() (previously declared in
Thanks in advance

Can you share your composer.json where thsi problem occurs ?

1 Like

Thanks I have removed composer.lock then change version of acorn in composer.json , then composer install ;
I think the problem that I have changed the composer json in themes instead .
Thanks very much for your help

This worked, thanks both for sharing! :grinning:

2 Likes