1

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:

composer.phar could not find file: artisan

Everything installed just fine, and Laravel works as it should.

Any ideas what could be causing this issue?

Edit 1

artisan exists in the root of the project, but it throws an exception when I attempt to run php artisan optimize:

PHP Exception

Side Note 1

If I try the alternative method (quicker) of installing Laravel (php composer.phar create-project laravel/laravel), I get the following:

Create Project Fail

Edit 2

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:

Install Fail

Edit 3

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...)

1
  • (I think I'll stop adding edits now - I think everyone get's the point... Any help will be fantastic - thanks.) Commented Jun 2, 2013 at 10:47

3 Answers 3

1

Solution Found:

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:\.

Sign up to request clarification or add additional context in comments.

Comments

0

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/

1 Comment

The artisan file is there. I can safely run php artisan optimize. No problems there. (Okay, wait. There seems to a problem with it. It can't find something - will post an update.)
0

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.

1 Comment

As per my solution above (or wherever StackOverflow feels like placing it), check your drive root - there might be a laravel folder in there. I wouldn't be surprised if there was one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.