I am trying to deploy new things on our server.
It's failing every time i don't know why, every time i get:
[Instance: i-0767cd899da6be838] Command failed on instance.
Return code: 2 Output: (TRUNCATED)... see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. -
It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed.
For more detail, check /var/log/eb-activity.log using console or EB CLI.
Code Pipeline raise this message:
Deployment completed, but with errors:
During an aborted deployment, some instances may have deployed the new application version.
To ensure all instances are running the same version, re-deploy the appropriate application version.
Failed to deploy application.
Unsuccessful command execution on instance id(s) 'i-0767cd899da6be838'.
Aborting the operation.
[Instance: i-0767cd899da6be838] Command failed on instance.
Return code: 2 Output: (TRUNCATED)... see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed.
For more detail, check /var/log/eb-activity.log using console or EB CLI.
I checked /var/log/eb-activity.log and /var/log/httpd/error_log in elastic beans but they have nothing.
This is composer.json may help to track issue:
{
"require": {
"php": "7.2",
"algolia/algoliasearch-client-php": "^3.1",
"authy/php": "3.0.5",
"barryvdh/laravel-cors": "^0.11.3",
"barryvdh/laravel-translation-manager": "^0.5.3",
"berkayk/onesignal-laravel": "^1.0",
"cviebrock/eloquent-sluggable": "^4.6",
"darkaonline/l5-swagger": "5.7.*",
"doctrine/dbal": "2.10.1",
"dusterio/laravel-aws-worker": "^0.1.26",
"fideloper/proxy": "^4.0",
"google/apiclient": "^2.4",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.4",
"jenssegers/agent": "^2.6",
"laravel/framework": "5.7.*",
"laravel/scout": "^7.0",
"laravel/slack-notification-channel": "v1.0.3",
"laravel/socialite": "^4.4",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.7",
"league/flysystem-aws-s3-v3": "^1.0",
"maatwebsite/excel": "3.1.25",
"pusher/pusher-php-server": "^4.1",
"segmentio/analytics-php": "^1.7",
"sentry/sentry-laravel": "1.6.1",
"spatie/laravel-activitylog": "v2.8.4",
"spatie/laravel-medialibrary": "^6.19.0"
},
"minimum-stability": "dev"
}
Any help ?
I got my problem solved.
At first i tried to apply solutions at this post but it didn't solve my problem.
The only thing that solved my problem was by upgrading my composer version.
So i upgraded my composer from 1.8.0 to 2.1.3 by:
composer self-update 2.1.3
I had to do this in the elastic beanstalk configuration file:
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update 2.1.3
Hope this helps you guys one day.
Related
I've just installed a fresh Spark app, went through the configuration instructions and set things up. My home view loads and so does the login view, however when I hit the registration route the view doesn't load. The header does, but there's no content. I tried:
php artisan cache:clear
php artisan view:clear
composer dumpautoload
npm run dev
EDIT:
I wanted to add some more information:
Token set (verified with “spark token”)
Composer 2.0
Homestead / Vagrant
Node v14.15.4
npm v6.14.11
Laravel Spark Installer 3.2.1
Laravel Installer 4.1.1
.env file includes my Stripe public and private keys (as suggested by this thread: https://laracasts.com/discuss/channels/spark/class-laravelsparkproviderssparkserviceprovider-not-found-1)
Mac OS 10.13.6
I have other Spark projects in development that are running on the same VM and they all load fine. I'm not sure if this helps, but here is the require portion of my composer.json:
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"laravel/spark-aurelius": "*#dev",
"laravel/ui": "^2.0"
},
Ok, so the problem was that I had my "live" Stripe keys in my .env file and not the "test" keys. Hope this helps someone out.
I am using a library to integrate Firebase SDK with laravel and when i try to create a FirestoreClient i am getting this error :
" Unable to create a FirestoreClient: The requested client requires the gRPC extension "
I am using ubuntu 18.04.3 and laravel 6.
I have already tried following this tutorial :
https://cloud.google.com/php/grpc
and it seems that i have installed the extension successfully as i have added the extension in the php.ini file as well and the composer.json file is showing the grpc in the packages like this:
"require": {
"php": "^7.2",
"fideloper/proxy": "^4.0",
"google/cloud": "^0.116.0",
"google/cloud-firestore": "^1.10",
"google/protobuf": "^v3.3.0",
"grpc/grpc": "^v1.1.0",
"kreait/firebase-php": "^4.0",
"laravel/framework": "^6.2",
"laravel/tinker": "^1.0"
},
But still getting the error when i try to create a client from the controller. Any guidance will be greatly appreciated. Thanks in advance
Trying to install the Tymon/jwt-auth package and work with it, following the directions on the site: https://jwt-auth.readthedocs.io/en/develop/laravel-installation/ Doesn't seem like the publish configuration seems to do anything, I'm not seeing a config/jwt.php file, and the command php artisan jwt:secretdoesn't do anything useful, saying that there are no commands defined in the "jwt" namespace.
Does anyone have any info on getting JWT working on Laravel 5.7?
Verified that it is in the composer.json:
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"tymon/jwt-auth": "^0.5.12"
},
It would be nice to get this released soon you can just using this
"tymon/jwt-auth": "dev-develop"
That worked for my project
Go to composer.json. Add this to require: "tymon/jwt-auth": "^1.0.0". Then run php composer update. The version of jwt 0.5 is not suported by carbon 2.0. This worked for me with laravel 5.8.
I've been stuck on this for around 4hrs now. I'm trying to run some tests on my Laravel 5 project. They worked a month or so ago when I ran them last, but I'm wanting to run them again. Just FYI, I'm using Vagrant.
Here's a snippet from my composer.json file.
"require": {
"laravel/framework": "5.0.*",
"illuminate/html": "^5.0",
"doctrine/dbal": "~2.5",
"maatwebsite/excel": "~2.0.0",
"zizaco/entrust": "dev-laravel-5",
"kalnoy/nestedset": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "4.2.*",
"phpspec/phpspec": "~2.1"
},
But whenever I run phpunit through the terminal, it states
This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.
I've tried the below - all found via Google and Stack Overflow.
the composer clear-cache command
reloading vagrant
changing versions (4.0, ~4.0, 4.8, 4.1.*)
adding "cache-files-ttl": 0 to my composer.json
Entering in the below all return the same error message about PHP 5.6
phpunit --check-version
phpunit --self-update
phpunit
For what it's worth, /vendor/phpunit/composer.json shows
"require": {
"php": ">=5.3.3",
...
}
...
"extra": {
"branch-alias": {
"dev-master": "4.2.x-dev"
}
},
Also, calling php -v shows "PHP 5.4.45 (cli) (built: Sep 4 2015 15:40:44)". phpinfo() shows the same thing.
Any ideas what's going on here?
You have more than one copy of phpunit on your system. Running this command in a terminal will tell you which one is in your path:
which phpunit
As your comments above confirmed, you weren't using the one in your project folder, so you'll need to start phpunit with
./vendor/phpunit/phpunit/phpunit [rest of command]
or create a symlink to that copy.
How do I install Laravel DomPDF?
I updated my Laravel's composer.json from this:
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": " ~1.2.1"
},
To this:
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": " ~1.2.1",
"barryvdh/laravel-dompdf": "0.5.*"
},
And then ran this command:
composer update barryvdh/laravel-dompdf": "0.5.*
But it always throws "don't install laravel 4.2" like that and the composer fails to update.
How can I fix this?
The very first line from the GitHub project page readme says:
DOMPDF Wrapper for Laravel 5
The second one states:
For Laravel 4.x, check the 0.4 branch!
Which means you need to add the 0.4.* version to you composer.json, for the package to work with Laravel 4:
"require": {
"laravel/framework": "4.2.*",
"maatwebsite/excel": " ~1.2.1",
"barryvdh/laravel-dompdf": "0.4.*"
},
change this line
"barryvdh/laravel-dompdf": "0.4"
you not use packege laravel 5 for laravel 4