简体   繁体   中英

Laravel Sail command does not run in WSL2

I set up an app using Laravel Sail, and hosted it in my C:Users/User/my_app folder, however API endpoints were terribly slow (around 7s to respond).

I decided to move my application to the WSL filesystem. I copied my_app folder to \\wsl$\Ubuntu-20.04\home folder. However, when I type ./vendor/bin/sail up command nothing happens. No error message, no "command not found message", nothing.

I tried changing home/my_app permissions as well as vendor/bin/sail permissions but it has not helped me. I have no idea how to solve this problem as I am not receiving any message from the console.

I think I solved the issue with copying the files from Windows to WSL using cp command run from WSL console ( cp /mnt/c/users/..... ).
However I stubmled upon this error Laravel & Docker: The stream or file "/var/www/html/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied which I solved using the answers from this github thread https://github.com/aschmelyun/docker-compose-laravel/issues/49 .
Now my endpoint response times are usually under 100ms.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM