anyone got an error i get while installing teepluss/theme in laravel - laravel

I wanted to install teepluss/theme so I added it to my composer.json
but now I get this error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'SuperClosure\Serializer' not found
I was capable to solve the first error by adding >"jeremeamia/superclosure": "^2.0"
but now when I add >Teepluss\Theme\ThemeServiceProvider::class, in app.php providers I get a new error :
> [ErrorException] Illegal offset type in unset
here's what i got in the script in composer.json

If you already run composer update, you can try run this script
php artisan config:cache
and
php artisan cache:clear.It can help you resolve that problem

Related

Lumen throwing error: Uncaught Error: Class 'Laravel\Lumen\Bootstrap\LoadEnvironmentVariables' not found in /var/www/bootstrap/app.php:5

I am working on a Laravel Lumen project. I am trying to spin up the existing project locally. First I installed the composer by running, "composer install". When I run the migration command, "php artisan migrate", I am getting the following error.
Fatal error: Uncaught Error: Class 'Laravel\Lumen\Bootstrap\LoadEnvironmentVariables' not found in /var/www/bootstrap/app.php:5
Stack trace:
#0 /var/www/artisan(18): require()
#1 {main}
thrown in /var/www/bootstrap/app.php on line 5
I tried deleting the vendor folder and running composer install again. It did not work. The class does not seem to exist either. But the composer was installed successfully. I am using Lumen version 7.0. What is wrong with it and how can I fix it?
Make sure you actually require the lumen package i.e. make sure your composer.json contains:
"require": {
"php": "^7.2.5",
"laravel/lumen-framework": "^7.0"
},
Afterwards run composer install again. If it worked then a folder /vendor/laravel/lumen-framework should be present
See official composer.json template for Lumen 7.0: https://github.com/laravel/lumen/blob/7.x/composer.json

How to remove ckeditor package (error: Class 'Ckeditor\CkeditorServiceProvider' not found)?

I followed the steps mentioned here:
How to remove a package from Laravel using composer?
including the step: Remove Service Provider from "app/config/app.php" (reference in "providers" array)
However, since I got an error:
In ProviderRepository.php line 208:
Class 'Ckeditor\CkeditorServiceProvider' not found
Script #php artisan package:discover handling the post-autoload-dump event returned with error code 1
The app is down and I cannot do any operation in terminal. How to get rid of the reference to this class?
Then run these commands.
php artisan cache:clear
composer dump-autoload -o
If an error occurs while clearing cache, then delete cache files under bootstrap/cache manually.

Symfony parse error in output.php when creating project in laravel

Installed laravel 5.6
Have PHP 7.0 installed as well.
When I try
laravel new sample-project
it creates the required files and dependencies but bails with an error below:
PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home/johndoe/laravel/sample-project/vendor/symfony/console/Output/Output.php on line 40
Have a feeling this might be due to issues with the symfony file but not sure how to go about getting the right version or making a change in Output.php
Trying any other command such as
php artisan list
results in the same error
Composer relevant section denoting laravel 5.6 / php 7.1.3
"require": {
"php": "^7.1.3",
"fideloper/proxy": "~4.0",
"laravel/framework": "5.6.*",
"laravel/tinker": "~1.0"
},
Any help would be appreciated.
EDIT
Based on the answer I had to create a project with laravel version 5.5 which means I had to use
composer create-project laravel/laravel sample-project "5.5.*"
That worked.
Laravel 5.6 requires PHP > 7.1.3
you will need to make sure your server meets the following
requirements:
PHP >= 7.1.3
I ended up having to edit the $PATH in my .bashrc file, because it was picking up an old version of php.
> whereis php
> echo $PATH
I found the correct version of php here: /opt/php71/bin
So now my .bashrc file looks like this:
export PATH=/opt/php71/bin:$PATH
This fixed the error I was getting in composer, AND now php artisan also works!
:-D
PS. The version of php that you're using in the shell may be different from the version used to serve your site. That can be fixed in cpanel's php selector.

Fresh CentOS 7, first Laravel Installation.Composer install breaks

I am fallowing this tutorial:
http://linoxide.com/linux-how-to/install-laravel-php-centos-7-ubuntu-15-04/
And on step 5) when running composer install in the project directory it starts to do staff, as expected, until this happened:
Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
PHP Fatal error: Undefined constant 'Illuminate\Session\TokenMismatchException' in /var/www/laravel-develop/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
PHP Fatal error: Undefined constant 'Illuminate\Session\TokenMismatchException' in /var/www/laravel-develop/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
Script php artisan optimize handling the post-install-cmd event returned with error code 255
What is the problem?
Thanks, Aleks
start creating a project (after updating composer) instead of downloading the referenced file do the following
from your terminal type in cd /var/www/
then type composer create-project laravel/laravel laravel-develop
your composer should download the latest version of Laravel
try it this way feel free to ask any questions.
Good Luck

Laravel Installer throwing error

I'm getting this error when calling the bash command
laravel new project
php -r "copy('.env.example', '.env');"
php artisan clear-compiled
Warning: require(/Users/Dale/Desktop/Outstanding Projects/project/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /Users/Dale/Desktop/Outstanding Projects/project/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/Users/Dale/Desktop/Outstanding Projects/project/bootstrap/../vendor/autoload.php' (include_path='.:') in /Users/Dale/Desktop/Outstanding Projects/project/bootstrap/autoload.php on line 17
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
Anyone come across this before.
I assume you used composer to install Laravel.
Laravel can't find your autoload.php file in vendor directory. Try composer install and composer dumpautoload. Also check if autoload.php is in directory.
Path to autoload.php should be in bootstrap/autoload.php file, check if path is correct with your system.

Resources