ryangjchandler / orbit

A flat-file database driver for Eloquent. 🗄
MIT License
872 stars 39 forks source link

mkdir(): Read-only file system #129

Closed danielh-official closed 2 years ago

danielh-official commented 2 years ago

Getting this console error whenever I try to call "Model::create()".

   ErrorException 

  mkdir(): Read-only file system

  at vendor/illuminate/filesystem/Filesystem.php:616
    612▕         if ($force) {
    613▕             return @mkdir($path, $mode, $recursive);
    614▕         }
    615▕ 
  ➜ 616▕         return mkdir($path, $mode, $recursive);
    617▕     }
    618▕ 
    619▕     /**
    620▕      * Move a directory.

      +4 vendor frames 
  5   [internal]:0
      App\Models\Todo::bootOrbital()

      +5 vendor frames 
  11  app/Commands/Todo/Make.php:32
      Illuminate\Database\Eloquent\Model::__callStatic("create", [])
danielh-official commented 2 years ago

I think I got a solution for this problem by publishing the config/orbit.php file and change that path of the content directory to the storage_path rather than the base_path, but now I'm getting this.

   InvalidArgumentException 

  Driver [md] not supported.

  at vendor/illuminate/support/Manager.php:109
    105▕                 return $this->$method();
    106▕             }
    107▕         }
    108▕ 
  ➜ 109▕         throw new InvalidArgumentException("Driver [$driver] not supported.");
    110▕     }
    111▕ 
    112▕     /**
    113▕      * Call a custom driver creator.

      +3 vendor frames 
  4   [internal]:0
      App\Models\Todo::bootOrbital()

      +5 vendor frames 
  10  app/Commands/Todo/Make.php:36
      Illuminate\Database\Eloquent\Model::__callStatic("create")
ryangjchandler commented 2 years ago

Hey @danielh-official, sorry you're having trouble. I've not seen this error before, which version of Orbit are you using? I assume 1.x.

Also, where are you running your application? The content directory should be created by Orbit if it's not present and should be created with 755 permissions.

ryangjchandler commented 2 years ago

Closing due to inactivity.

yang-he commented 9 months ago

I am deploying my Laravel app to Vercel which is a serverless system, and I received the same error.

image