Could not open input file: artisan

后端 未结 27 955
清歌不尽
清歌不尽 2020-11-30 17:45

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-c

相关标签:
27条回答
  • 2020-11-30 18:25

    If it is your first install of laravel then create another directory/folder inside the laravel directory and then move to that empty folder and create another project using the command below:

    composer create-project --prefer-dist laravel/laravel blog
    

    This will create a new project named "blog", then go back to parent laravel directory and now you can run this command:

    php artisan serve
    

    You will receive the return such as:

    laravel deployment server started: http://localhost:8000
    

    See attached image

    0 讨论(0)
  • 2020-11-30 18:25

    This error happens because you didn't install composer on your project.

    run composer install command in your project path.

    0 讨论(0)
  • 2020-11-30 18:26

    After installing composer, you need to create the project:

    composer create-project laravel/laravel /path/to/tour/project
    

    You can see the documentation, for your php version the lastest Laravel you can install is 5.0.

    Now days here is the lastest version and require > php7.0. Here is the documentation.

    0 讨论(0)
提交回复
热议问题