laravel error when I ran it on terminal in macos - laravel

when I ran laravel in my terminal it's not working, I already added the path to my bash_profile I am using MacOS. Valet is working I dont know what happened if it is from the installation or not.
this is the returned error:
PHP Fatal error: Uncaught Error: Class 'Laravel\Installer\Console\NewCommand' not found in /Users/mycomputer/.composer/vendor/laravel/installer/laravel:11
Stack trace:
#0 {main}
thrown in /Users/mycomputer/.composer/vendor/laravel/installer/laravel on line 11
Fatal error: Uncaught Error: Class 'Laravel\Installer\Console\NewCommand' not found in /Users/mycomputer/.composer/vendor/laravel/installer/laravel:11
Stack trace:
#0 {main}
thrown in /Users/mycomputer/.composer/vendor/laravel/installer/laravel on line 11

Related

PHP Fatal error: Interface 'JsonSerializable' not found when i upload it to cpanel

PHP Fatal error: Interface 'JsonSerializable' not found in /home/peoplesi/public_html/core/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 40
i get this error when i upload it to cpanel
My php version is 7
i also tried composer update many time
Can anyone kindly give me a solution to remove this error

When I run composer update I get a fatal error

When I run composer update I get the following error:
PHP Fatal error: Interface 'Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface' not found in /var/www/html/danceGitHub/dance/vendor/symfony/console/Formatter/OutputFormatter.php on line 22

Fatal error: Uncaught Error: Call to undefined method JSite::execute() joomla installation

Fatal error: Uncaught Error: Call to undefined method JSite::execute() joomla installation
Hi, I am trying to move the joomla file with ine server with another server, I have used Akeeba Kickstart for that purpose, but after the installation the above messege shows.
Current server 1and1.uk

Laravel 5 issue : libraries/admin/ does not exist and could not be created

I'm trying to install laravel from git. I cloned the repository and tried the command
php artisan serve
But It gave this error message.
Warning:
require(C:\wamp64\www\reguard\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\wamp64\www\reguard\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required
'C:\wamp64\www\reguard\bootstrap/../vendor/autoload.php'
(include_path='.;C:\php\pear') in
C:\wamp64\www\reguard\bootstrap\autoload.php on line 17
and I ran a composer install
But it stopped with this error,
[RuntimeException] libraries/admin/ does not exist and could not be
created.
So I ran a composer du as the first comment but now getting this,
[Symfony\Component\Debug\Exception\FatalErrorException] Class
'R2S\Admin\Providers\AdminServiceProvider' not found
Hope someone can help.

PHPunit Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration()

i don't know if it's related to Laravel 5.4. when i run phpunit command after installing laravel 5.4 without making any changes i get Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() but when i run php artisan dusk it runs normally
c:\xampp\htdocs\ublocker>phpunit
PHP Fatal error: Uncaught Error: Call to undefined method
PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
#0 C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
{main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
c:\xampp\htdocs\ublocker>phpunit
PHP Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
#0 C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
#0 C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
c:\xampp\htdocs\ublocker>php artisan dusk
PHPUnit 5.7.7 by Sebastian Bergmann and contributors.
F. 2 / 2 (100%)
any ideas how to fix this?
Seems like your version installed globally does not meet minimal required version. Try to run
phpunit --version
I bet you will get some like 5.1. The php artisan dusk command uses different version which is located in vendor/bin/phpunit. So, you are also able to use this version instead. Just type:
vendor/bin/phpunit
instead of phpunit. You have to upgrade your global phpunit version if it works.
In my case the following command worked in windows environment, with \ in place of /:
vendor\bin\phpunit
Had the same problem at Laravel 5.4. This worked for me.
Step 1: update your composer
composer update
Step 2: run the phpunit
vendor/bin/phpunit
You can run a specific test by specifying the file
vendor/bin/phpunit tests/Feature/ExampleTest.php
I have same issue ans solved with this step :
Check diff version
$ phpunit --version
PHPUnit 6.5.5 by Sebastian Bergmann and contributors.
$ ./vendor/bin/phpunit --version
PHPUnit 8.3.5 by Sebastian Bergmann and contributors.
Update global phpunit:
if versions not equal update phpunit with
composer global require phpunit/phpunit:^8
check again versions
$ phpunit --version
PHPUnit 8.3.5 by Sebastian Bergmann and contributors.
$ ./vendor/bin/phpunit --version
PHPUnit 8.3.5 by Sebastian Bergmann and contributors.
For any who is experiencing this, vendor/bin/phpunit definitely works but you might want to add this line to your .bashrc or .bash_profile or whatever convenient for you to make it works.
PATH="./vendor/bin:$PATH"
*tested on Linux only
I had same error with homestead laravel 5.6
when I ran phpunit command from my user it is works fine but when I ran it by sudo I got that error. try to run this command from your user not sudo maybe its work for you too
One solution is to add vendor/bin to the start of your path. On Unix like OSes running bash you can add the following to the end of your .bashrc file:
export PATH=vendor/bin:$PATH
In Windows 10, you can access your Path environment variable by accessing System Properties, Advanced tab and clicking the Environment Variables... button.
Either way, inserting vendor/bin at the front of the path will cause your OS to look for phpunit in ./vendor/bin. If you're in the root of your laravel project, it'll find the executable included with Laravel. If not, it'll move on to using the global version.

Resources