Reputation: 9007
Today, I pulled down the laravel/laravel
repository from Github. I then ran php composer.phar install
(as I normally would on my system, with a command window in the project directory). However, when I ran php composer.phar update
, I received this error:
Everything installed just fine, and Laravel works as it should.
Any ideas what could be causing this issue?
artisan
exists in the root of the project, but it throws an exception when I attempt to run php artisan optimize
:
If I try the alternative method (quicker) of installing Laravel (php composer.phar create-project laravel/laravel
), I get the following:
Upon installation, I also get the same error, where it claims it cannot find artisan
. Therefore, the installation does not fully complete. I believe that it is stopping when it wants to compile classes (or something to that effect), and then write bootstrap/compiled.php
. That file doesn't exist.
Here's the snap from the install:
It seems that Composer is looking for artisan
in the drive root (C:\
). Why is it doing this? Even if I specify -d
on the update, it throws the error. (I picked this up from a hunch - simply copied artisan
to the root of the drive and it found it - albeit, it obviously did not run...)
Upvotes: 1
Views: 4589
Reputation: 9007
Composer makes calls to php artisan <command>
(as per the instruction in composer.json > scripts
), but it does not see what directory it is running from (perhaps because it is an external command?).
So, I solved my initial problem by using an absolute path to artisan
in composer.json
.
Everything is working now. I just wish I knew how to get Composer to know that it is running from C:\LocalServer\lab\laravel
, and not just C:\
.
Upvotes: 1
Reputation: 1
I had this problem today too. My laravel folder inside the vendor was deleted after composer update. I ran composer install again and problem resolved.
Upvotes: 0
Reputation: 11
As i can see, your artisan file is missing. Can you post the exact steps on how you install it ? Also, please follow http://laravel.com/docs/installation and http://niallobrien.me/2013/03/installing-and-updating-laravel-4/
Upvotes: 0