Valet install Fatal error: Uncaught Error: Call to a member function run() on null - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, April 17, 2023

Valet install Fatal error: Uncaught Error: Call to a member function run() on null

I am trying to install laravel valet, well i have been trying all day. Here is the commands that i am running along with the error that i am getting:

user@MacBook-Pro ~ % composer global require laravel/valet       
Changed current directory to .composer
./composer.json has been updated
Running composer update laravel/valet
Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 1 update, 3 removals
  - Removing symfony/polyfill-mbstring (v1.27.0)
  - Removing symfony/var-dumper (v3.4.47)
  - Removing tightenco/collect (v8.83.27)
  - Locking illuminate/collections (v9.52.5)
  - Locking illuminate/conditionable (v9.52.5)
  - Locking illuminate/macroable (v9.52.5)
  - Upgrading laravel/valet (v3.1.13 => v4.0.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 3 installs, 1 update, 3 removals
  - Downloading illuminate/conditionable (v9.52.5)
  - Downloading illuminate/collections (v9.52.5)
  - Removing tightenco/collect (v8.83.27)
  - Removing symfony/var-dumper (v3.4.47)
  - Removing symfony/polyfill-mbstring (v1.27.0)
  - Installing illuminate/conditionable (v9.52.5): Extracting archive
  - Installing illuminate/macroable (v9.52.5): Extracting archive
  - Installing illuminate/collections (v9.52.5): Extracting archive
  - Upgrading laravel/valet (v3.1.13 => v4.0.1): Extracting archive
1 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
10 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Found 24 security vulnerability advisories affecting 1 package.
Run composer audit for a full list of advisories.
Using version ^4.0 for laravel/valet
user@MacBook-Pro ~ % valet install                   
Password:

Fatal error: Uncaught Error: Call to a member function run() on null in .composer/vendor/laravel/valet/cli/Valet/CommandLine.php:68
Stack trace:
#0 .composer/vendor/laravel/valet/cli/Valet/CommandLine.php(46): Valet\CommandLine->runCommand('sudo -u "user...', Object(Closure))
#1 .composer/vendor/laravel/valet/cli/includes/helpers.php(28): Valet\CommandLine->runAsUser('printf $(brew -...')
#2 .composer/vendor/composer/autoload_real.php(41): require('....')
#3 .composer/vendor/composer/autoload_real.php(45): {closure}('ee069e88b021c1d...', '....')
#4 .composer/vendor/autoload.php(25): ComposerAutoloaderInitcfb83a5dce2c9ff388a3a406b4d4edc8::getLoader()
#5 .composer/vendor/laravel/valet/cli/app.php(25): require_once('....')
#6 .composer/vendor/laravel/valet/cli/valet.php(4): require_once('....')
#7 {main}
  thrown in .composer/vendor/laravel/valet/cli/Valet/CommandLine.php on line 68

My PHP version is

php -v
PHP 8.1.18 (cli) (built: Apr 14 2023 05:22:06) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.18, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.18, Copyright (c), by Zend Technologies

I am hoping someone can really help me. I had it installed on another laptop and this one is not working.



source https://stackoverflow.com/questions/76029919/valet-install-fatal-error-uncaught-error-call-to-a-member-function-run-on-nu

No comments:

Post a Comment