Could not open input file: artisan

后端 未结 27 921
清歌不尽
清歌不尽 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 17:59

    If you're running your Laravel project in Vagrant and have just SSH-ed into the virtual machine, don't forget to cd /vagrant before you try running artisan commands!

    0 讨论(0)
  • 2020-11-30 17:59

    if you re in say my-project/app/somefolder run in terminal cd .. two times to get in my-project/ folder

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

    After creating the project you should move in the folder before issuing the command

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

    I just needed to make artisan executable.

    chmod +x artisan

    ...and it works without the php prefix then.

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

    I also had the problem i just installed but forgot to jump the created project folder. So you need to jump your project folder.

    cd project_name

    and then serve php artisan command

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

    Just try and execute the command in directory where all laravel code resides. Happened with me too, I was trying to run the command in project's root folder, but the code was in a sub directory

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