Installing v5 on shared hosting gives errors

Hi,

I have the latest version v4 running on this shared hosting and im trying to install v5 to see if it works good etc before i migrate.

After i git the stable release and have it in https://invoices2.mydomain.com, it would give me this error:

Warning: require(/home/clients/15f153e506bfcee335069cf4812c82/sites/invoices2.mydomain.ch/public/…/vendor/autoload.php): failed to open stream: No such file or directory in /home/clients/15f153e506bfcee335069cf4812c82/sites/invoices2.mydomain.ch/public/index.php on line 26

Warning: require(/home/clients/15f153e506bfcee335069cf4812c82/sites/invoices2.mydomain.ch/public/…/vendor/autoload.php): failed to open stream: No such file or directory in /home/clients/15f153e506bfcee335069cf4812c82/sites/invoices2.mydomain.ch/public/index.php on line 26

Fatal error: require(): Failed opening required ‘/home/clients/15f153e506bfcee335069cf4812c82/sites/invoices2.mydomain.ch/public/…/vendor/autoload.php’ (include_path=’.:/opt/php7.4/lib/php’) in /home/clients/15f153e506bfcee335069cf4812c82/sites/invoices2.mydomain.ch/public/index.php on line 26

I get this error if i visit invoices2.mydomain.ch or /setup or /public…

Any thoughts?

Hi,

How are you installing the app? I think you might be missing the vendor files which are included with the zip but need to be installed with composer if using the code from GitHub.

Vendor exists under /public

I tried to run this: ```
composer install --no-dev -o


But i keep getting this error:

composer install --no-dev -o
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for jean85/pretty-package-versions 2.0.4 -> satisfiable by jean85/pretty-package-versions[2.0.4].
    - jean85/pretty-package-versions 2.0.4 requires composer-runtime-api ^2.0.0 -> no matching package found.
  Problem 2
    - jean85/pretty-package-versions 2.0.4 requires composer-runtime-api ^2.0.0 -> no matching package found.
    - sentry/sentry 3.3.1 requires jean85/pretty-package-versions ^1.5|^2.0.1 -> satisfiable by jean85/pretty-package-versions[2.0.4].
    - Installation request for sentry/sentry 3.3.1 -> satisfiable by sentry/sentry[3.3.1].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   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

I forgot to mention that i had the v5 beta version running before on the same shared hosting.

It looks like you may be attempting to use composer 1 - try using composer 2

This is the version installed:

composer --version
Composer version 1.10.22 2021-04-27 13:10:45

This is a shared hosting server so i cant install/upgrade. Or is there a way to run composer v2 at the same time?

Composer was the problem.

running the command with “composer2” worked!