How to solve PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Container\Container::basePath() error on laravel version update?

I'm trying to update the laravel version from 5.3 to 5.4 but when I run the composer update command I got this error

PHP Fatal error:  Uncaught Error: Call to undefined method Illuminate\Container\Container::basePath() in /my-project/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:179
Stack trace:
#0 /my-project/vendor/carbonate/environmentconfig/src/EnvironmentConfig.php(49): base_path()
#1 /my-project/bootstrap/app.php(16): Carbonate\EnvironmentConfig\EnvironmentConfig::get()
#2 /my-project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(289): Application->storagePath()
#3 /my-project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(271): Illuminate\Foundation\Application->bindPathsInContainer()
#4 /my-project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(147): Illuminate\Foundation\Application->setBasePath()
#5 /my-project/bootstrap/app.php(21): Illuminate\Foundation\Application->__construct()

I follow this guide to do the update: https://laravel.com/docs/5.4/upgrade

I also try deleting the vendor folder and composer.lock file and running the command composer install, but I got the same error.

Your help would be greatly appreciated



Read more here: https://stackoverflow.com/questions/65711473/how-to-solve-php-fatal-error-uncaught-error-call-to-undefined-method-illuminat

Content Attribution

This content was originally published by Alexander Granda at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: