kora
kora copied to clipboard
Install fails because of missing vendor file
Hi,
I am trying to install KORA and had a question - I've tried it on a reclaim hosting website and on a digital Ocean droplet server and both times I ran into the same issue - installation stalled because of a missing vendor directory in the Kora files I downloaded from git hub.
This error appeared when using my reclaim website - same error occurred on my msu domains website - the installer is looking for a "vender" folder that is not in the kora file on git hub or anywhere else I can find.
I though the issue may be with the LAMP stack so i installed using a digital ocean droplet and directions to install LAMP stack on digital ocean server and the documentation to install all KORA pre-requisites. I installed KORA as per the GIT Hub documentation and received the exact same error.
"PHP Warning: require(/home/kora/bootstrap/../vendor/autoload.php): Failed to open stream: No such file or directory in /home/kora/bootstrap/autoload.php on line 54 PHP Fatal error: Uncaught Error: Failed opening required '/home/kora/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/kora/bootstrap/autoload.php:54 Stack trace: #0 /home/kora/artisan(16): require() #1 {main} thrown in /home/kora/bootstrap/autoload.php on line 54"
Any help would be appreciated
Thank you, Jeff
Update / partial fix from working with Brian Geyer:
Running "composer update --ignore-platform-reqs" rather than "composer install" fixes the issue with the missing Vendor directory. Updating the composer generated one error message - some incorrect syntax of line 24 of the version.php file, but this did not negatively impact the "artisan kora:install" proccess and i was able to install KORA just fine by following the guide on https://chi-initiative.github.io/kora-documentation/getting-started/installing_kora_domains/, with some neccessecary modifications by Brian which he will detail in a later post and updated general documentation.
All of this was on reclaim domains - it was partially tested on a digital ocean droplet (Ubuntu 22.04 / Apache2) but I ran into a wall with setting up the subdomains and Brian had sorted out the reclaim domains workflow.
I've been working with @jeffjb4488 on this. After a lot of trial and error, what I figured out is that both Composer and Kora require PHP 8.1 for installation, due apparently to a single issue with /vendor/sebastian/version/src/Version.php
. It's possible that running composer update --ignore-platform-reqs
(or install) with php 8.0 will still succeed, but it throws this error
In Version.php line 25:
[ParseError]
syntax error, unexpected identifier "string", expecting variable
Exception trace:
at /home/geyerbri/test-kora/vendor/sebastian/version/src/Version.php:25
Composer\Autoload\{closure}() at phar:///usr/local/bin/composer/vendor/composer/ClassLoader.php:433
Composer\Autoload\ClassLoader->loadClass() at /home/geyerbri/test-kora/vendor/phpunit/phpunit/src/Runner/Version.php:37
PHPUnit\Runner\Version::id() at /home/geyerbri/test-kora/vendor/phpunit/phpunit/src/Runner/Version.php:45
PHPUnit\Runner\Version::series() at /home/geyerbri/test-kora/vendor/nunomaduro/collision/src/Adapters/Phpunit/Autoload.php:10
require() at /home/geyerbri/test-kora/vendor/composer/autoload_real.php:39
{closure}() at /home/geyerbri/test-kora/vendor/composer/autoload_real.php:43
ComposerAutoloaderInit832d660ce8abc902c78efed9ed281d3e::getLoader() at /home/geyerbri/test-kora/vendor/autoload.php:25
require_once() at /home/geyerbri/test-kora/vendor/laravel/framework/src/Illuminate/Foundation/ComposerScripts.php:43
Illuminate\Foundation\ComposerScripts::postAutoloadDump() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:439
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:257
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:129
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:438
Composer\Autoload\AutoloadGenerator->dump() at phar:///usr/local/bin/composer/src/Composer/Installer.php:349
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:146
Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:377
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:141
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
require() at /usr/local/bin/composer:29
The Kora installation then fails with this error (when run with php 8.0):
Parse error: syntax error, unexpected identifier "string", expecting variable in
/home/geyerbri/test-kora/vendor/sebastian/version/src/Version.php on line 25
In an MSU Domains environment, the server-wide php version is 8.0, but it's possible to specify an earlier or later php version for specific domain or subdomain directories. Without specifying the exact pathways to php, Composer, and the composer.json file, the Composer update will always use the server-wide php. But since the subdomain-specific php can be set to 8.1, it's possible to successfully run php artisan kora:install
with php 8.1 without any errors, even after the error that occurs when Composer uses php 8.0 to update.