Error when running composer update: Script #symfony-scripts handling the post-update-cmd event returned with an error - composer-php

I'm using Symfony 3.2 and am trying to run a composer update command. This composer file attached to a brand new install. The complete error is:
Script #symfony-scripts handling the post-update-cmd event returned
with an error [RuntimeException]
Error Output: sh: #symfony-scripts: command not found
I can't find any information on what this means or how to resolve it.

This was actually a composer issue and nothing to do with Symfony or it's vendor files. I needed to run composer selfupdate and then I could successfully run composer update

I solved it by editing the following in composer.json
change:
for:

Related

Composer update or install issue

I have an web application which successfully run since august 2020. now i want to add milon barcode package and it successfully ok in local server that's why i need to run coposer install or update command in cpanel terminal. but there show some problem.
N.B Laravel version 5.8, composer version 2.0.6, php version 7.4.
when i try to run composer install it show error
PHP Fatal error: Uncaught ErrorException: proc_open(): unable to create pipe Too many open files in phar:///opt/cpanel/composer/bin/composer/vendor/symfony/console/Application.php:952
when try to run composer update
Failed to download phpoption/phpoption from dist: getaddrinfo() thread failed to start
when try to run composer self-update
[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: "/opt/cpanel/composer/bin/composer" could not be written.
rename(/opt/cpanel/composer/bin/composer): failed to open stream: Permission denied
You need to enable proc_open
Please Follow the Instruction Below in cPanel
Software > MultiPHP INI Editor > Editor Mode
Select your PHP version and search for (disable_functions)
disable_functions = "proc_open,..., ..."
Now remove (proc_open) from the list and save.
Otherwise, contact your hosting service provider to enable proc_open.
try using this command
composer update --no-scripts

Laravel Artisan not working at all after clone

I have this weird situation: I've cloned all my repositories from github in a new local machine running Mac OsX some of them has Laravel framework installed but only some of these can execute the cmd php artisan.
I've tried to check permission on folders, uninstall/re-install composer and I've also tried to install a fresh version of Laravel. Another problem is that running the command doesn't output anything - no errors, nothing - only a new empty line of the terminal.
The only thing I know is that if I clone one of the repositories, then run composer install it throws Script php artisan optimize handling the post-install-cmd event returned with error code 255.
Thanks
Update 1:
I've found running composer install -vvv -o that composer throw this error
Warning: require(/Users/USERNAME/laravel/bootstrap/autoload.php): failed to open stream: No such file or directory in /Users/USERNAME/laravel/artisan on line 16
Fatal error: require(): Failed opening required '/Users/USERNAME/laravel/bootstrap/autoload.php' (include_path='.:') in /Users/USERNAME/laravel/artisan on line 16
Update 2:
It seems that cmd git clone didn't copy that autoload file bootstrap/autoload.php for some reason that I don't understand at all.
I've imported the file manually from github and run, removed the vendor folder then run again composer install --no-scripts but still having the problem with artisan and if I run composer update it throw Script php artisan optimize handling the post-update-cmd event returned with error code 255
I had to re-install laravel and copy files manually to make it works again.

InvalidArgumentException Please provide a valid cache path Error laravel 5.2

I'm working with Laravel 5.2 and i have an error when i run composer update or artisan optimize ..
i've searched on my vendor, i didn't found compiled.php file ! i try to generate this i run the artisan optimize, i have the same error
[InvalidArgumentException]
Please provide a valid cache path
Script php artisan clear-compiled handling the post-update-cmd event returned with error code 1
how i can resolve this ?
Please Try it:
create these folders under storage/framework:
sessions
views
cache
And also you can use this command to install:
sudo composer install
Its will be working.

Composer failing on elastic beanstack deploying

I had run the same deploy hooks on AWS’s elastic beanstalk since I started deploying laravel to elastic beanstalk and on a recent update it failed to deploy due to something happening with the most recent composer.
The common approach to deploy with composer on elastic beanstalk is to update composer then use it to install your packages, which worked fine until I got the following error
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Warning: require(/var/app/ondeck/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/app/ondeck/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required ‘/var/app/ondeck/bootstrap/../vendor/autoload.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/app/ondeck/bootstrap/autoload.php on line 17
As you can see, laravel couldn’t find the autoload file from the vendor folder which was a result of composer not running correctly
What would be the error and how to fix it.
I had the same issue this comes when you have made lot of changes in the development to the composer file and the environment which you set to deploy has no updates on the composer. First update you deployment machine by updating composer before deploying. This will solve your issue.

I get an error when installing laravel or when I try updating composer. How do I resolve it?

I get this error
"require(/var/www/html/data_security/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/data_security/bootstrap/autoload.php on line 17"
when installing laravel or when I try updating composer. How do I resolve it?
For fresh installation you will need to run composer install instead of composer update. I faced similar issue and composer install did the trick for me.

Resources