Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not open input file: artisan

When trying to create a new laravel project, The following error appears on the CLI:

Could not open input file: artisan

Script php artisan clear-compiled handling the post-install-cmd event returned with an error

I am using the latest version of XAMPP v3.2.1 with PHP 5.5.15 and with mcrypt enabled (made sure of that by issuing the command php -m). And I am running windows 8.1

like image 896
wessodesigner Avatar asked Oct 04 '14 13:10

wessodesigner


People also ask

Can artisan open input file?

There is a chance of getting this error when you are running the “php artisan” command outside the Laravel project folder. To resolve this, you need to run the “php artisan” command inside the Laravel project location.

What does Cannot open input file artisan mean?

Missing correct permission for artisan There is sometimes a chance of the artisan not being executable, in that case, the artisan command cannot able to access and it will throw an error like this. So you need to confirm that artisan is executable.

Why php artisan serve not working?

Reasons why php artisan serve not workingYou are running php artisan serve command in wrong directory. php artisan serve is laravel command only work with laravel project. Check project directory and run in root directory of your project. The requested host or port is not available.


1 Answers

You need to first create Laravel project and if you already have one you need to go to this project dir using cd command in terminal for example cd myproject.

Now you will be able to run any artisan commands, for example running php artisan will display you list of available commands.

like image 129
Marcin Nabiałek Avatar answered Sep 27 '22 02:09

Marcin Nabiałek