How to run a laravel git clone in local

583 views Asked by At

I have downloaded our Laravel project from bitbucket using

git clone https://[email protected]/team/project.git

Then I tried composer install

php artisan clear-compiled PHP Warning:  require(/home/sachith/xxxx/xxx_y/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in /home/sachith/xxxx/xxx_y/bootstrap/autoload.php on line 17 
PHP Fatal error:  require(): Failed opening required '/home/sachith/xxxx/xxx_y/bootstrap/../vendor/autoload.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/home/sachith/xxxx/xxx_y/bootstrap/autoload.php on line 17 
Script php artisan clear-compiled handling the pre-install-cmd event returned with error code 255

I am confused how to run this, What did I miss here? How to run this properly?

1

There are 1 answers

3
VonC On

See laravel issue 5066 and PR 3687

Can't rely on being able to run php artisan, before updating. See composer/composer#5066

Before, running install without a lock file did an install that was almost an update, but still ran the pre/post-install-cmd scripts.
Now we normalized it to actually run an update and fire pre/post-update-cmd, because that's what it is doing.
If you have a lock file though it will run install as before.

When installing without lockfile, Composer now behaves as upgrade.
It also executes the pre-upgrade-cmd instead of pre-install-cmd. Behaviour with composer.lock available is not changed.

(that recent change can affect some existing projects)

So maybe your composer.lock is missing from your repo? With the latest composer version, doing a fresh install will fail because the vendor files are not yet present.