LoginSignup
0
0

More than 3 years have passed since last update.

Windows+Docker+Laravelでの開発時に「There is no existing directory at "C:\........\storage\logs" and its not buildable: No such file or directory」が出る時の対処

Last updated at Posted at 2020-04-03

環境

Windows10 pro
Docker for Windows
Laravel 7.x
ローカルのDockerでphp、nginxのコンテナを立てています。

状況

/config/logging.phpの設定を変えた後、反映させるためにWindows側のコマンドプロンプトで「php artisan config:cache」を打ったら急に出るようになりました。
ネットで情報を探すと再度キャッシュを消すと直る等ありましたが、直らず..。

解決した方法

Docker側phpのコンテナにCliで入り、そっちの方で上記コマンドを打つと解消されました。
しっかりと原因特定まではできてませんが、Windows側でやるとパスの解決がWindows仕様になってしまうとかですかね。

余談

解決後、Log::debug(storage_path());でログに吐いたら正しいパスはこうなってました。

[2020-04-03 09:58:48] local.DEBUG: /var/www/APP_NAME/storage
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0