简体   繁体   中英

Laravel Valet Operation not Permitted

I have PHP 7.3 and a Laravel 8 site that has been parked with Laravel Valet. I try to access the application at app.test and I get the following message:

Warning: opendir(/Users/username/Desktop/CodingProjects): failed to open dir: Operation not permitted in /Users/username/.composer/vendor/laravel/valet/server.php on line 132 404 - Not Found

I have tried making the public folder and server.php file executable in the Laravel root folder the app is running it and have been going in circles. Running a Mac with an M1 chip. Any help would be much appreciated!

I met the same issue and managed to solve by the following steps: (Note: you will need to reconfigure your parked directories and linked projects after that)

  1. valet parked to check the current directories parked
  2. valet links to check the current projects linked
  3. rm -rf ~/.config/valet removing valet configurations
  4. valet install reconfigure valet
  5. Repark and relink removed directories and projects

I encountered the same issue after I upgraded to Mac OS Ventura.

The steps I used to fix this:

  1. rm -rf ~/.config/valet
  2. valet install
  3. valet park to the main folder for all the sites. You can run valet link changeToYourDirectory if you want to link only a single directory.

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