My CakePHP 3 app runs fine on my local server. But when I install it on Heroku, I keep getting the following error:
Error: The application is trying to load a file from the DebugKit plugin.
Make sure your plugin DebugKit is in the /app/plugins/ directory and was loaded.
I'm confused because I already did composer install
, and I see debug_kit in vendor/cakephp/debug_kit
but the error seems to be looking in the other plugins directory.
Why is this happening?
Update: I ran composer install --verbose
and I see the following error:
$ composer install --verbose
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Analyzed 91 packages to resolve dependencies
Analyzed 165 rules to resolve dependencies
Nothing to install or update
Generating autoload files
post-autoload-dump: Cake\Composer\Installer\PluginInstaller::postAutoloadDump post-install-cmd: App\Console\Installer::postInstall
Script App\Console\Installer::postInstall handling the post-install-cmd event terminated with an exception
[InvalidArgumentException]
Maximum number of attempts must be a positive value.
Exception trace:
() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Question/Question.php:191
Symfony\Component\Console\Question\Question->setMaxAttempts() at phar:///app/.heroku/php/bin/composer/src/Composer/IO/ConsoleIO.php:246
Composer\IO\ConsoleIO->askAndValidate() at /app/src/Console/Installer.php:55
App\Console\Installer::postInstall() at phar:///app/.heroku/php/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:211
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///app/.heroku/php/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:167
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///app/.heroku/php/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:92
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///app/.heroku/php/bin/composer/src/Composer/Installer.php:342
Composer\Installer->run() at phar:///app/.heroku/php/bin/composer/src/Composer/Command/InstallCommand.php:131
Composer\Command\InstallCommand->execute() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar:///app/.heroku/php/bin/composer/src/Composer/Console/Application.php:146
Composer\Console\Application->doRun() at phar:///app/.heroku/php/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar:///app/.heroku/php/bin/composer/src/Composer/Console/Application.php:82
Composer\Console\Application->run() at phar:///app/.heroku/php/bin/composer/bin/composer:43
require() at /app/.heroku/php/bin/composer:25
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]
The error appears to be coming from Symfony
I ran into this once and believe I fixed it by replacing App\Console\Installer
with a newer version.
This commit that fixes it traces back to this issue: https://github.com/cakephp/app/issues/241
(You might take this opportunity to upgrade other files in your app that came from the template.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With