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.
Related
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.
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 have been trying to deploy a php app on heroku but I keep getting this error:
-----> PHP app detected
-----> Bootstrapping...
-----> Installing platform packages...
ERROR: neither your composer.json 'require' section nor any
dependency therein requires a runtime version, but 'require-dev'
or a dependency therein does. Heroku cannot automatically select
a default runtime version in this case.
Please add a version requirement for 'php' to section 'require'
in composer.json, 'composer update', commit, and deploy again.
! ERROR: Couldn't load 'composer.lock'; it must be a valid lock
file generated by Composer and be in a consistent state.
Check above for any parse errors and address them if necessary.
Run 'composer update', add/commit the change, then push again.
! Push rejected, failed to compile PHP app.
! Push failed
anyone know how I can solve it?
So this is what I would look at, and sorry if any of these assumptions are wrong, or I am going through stuff you have already done.
Your composer.json should be divided up into require and require-dev. Require would be installed in production with require-dev added locally.
{
"name": "something/something",
"description": "A description of my project",
"type": "project",
"require": {
"php": ">=5.5.9",
"doctrine/cache": "1.4.*",
"elasticsearch/elasticsearch": "~2.0",
"monolog/monolog": "~1.0",
"knplabs/github-api": "~1.2",
"ezyang/htmlpurifier": "~4.6",
"easyrdf/easyrdf": "0.9.*",
"hoa/compiler": "~2.15",
"hoa/visitor": "~1.15",
"collectiveaccess/service-wrapper": "v1.1",
"phpoffice/phppresentation": "dev-master",
"phpoffice/phpword": "v0.13.*"
},
"require-dev": {
"phpunit/phpunit": "4.3.*",
"maximebf/debugbar": ">=1.0.0"
}
}
If you have not got composer installed you need to do so. https://www.hostinger.com/tutorials/how-to-install-composer
Run php composer install in the first instance of php composer update later on to install your dependencies.
Please commit everything except, the vendor files and any cache or logging. This would include composer.lock which is a list of installed dependencies and the versions you are using.
Heroku will install these dependencies in production making sure it uses the same version as specified in the lock file.
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.
I have a website built on the Kohana framework. I see now that there exists Composer packages on packagist for the various components like core and the standard modules like auth and database.
What steps should I take to make my existing website "Composerized"?
I have lightly used Composer in other projects, but unsure what I should do in this case.
Simply install composer
http://getcomposer.org/
curl -sS https://getcomposer.org/installer | php
Run a composer init to set up a new composer file. Then go and find your package you wish to install, so for example mine looks something like this
{
"require": {
"phpunit/phpunit": "3.7.24",
"phing/phing": "dev-master",
"mailgun/mailgun-php": "dev-master",
"modulargaming/kostache": "dev-master",
"codeception/codeception": "dev-master",
"erusev/parsedown": "dev-master",
"aws/aws-sdk-php": "2.3.*"
}
}
Then just run composer install or composer update
You can then just comment out the modules in bootstrap.php
That is a very simple composer.json file, but gives you a basic idea.