The laravel-phpartisan command returns an error no matter what command is entered

Source: Internet
Author: User
Tags windows 5 composer install
I followed segmentfault. coma119004264598315 step by step, but the phparisan command cannot be used.

I followed https://segmentfault.com/a/119004264598315step by step, but the php arisan command cannot be used.

Reply content:

I followed https://segmentfault.com/a/119004264598315step by step, but the php arisan command cannot be used.

There are several situations:

  1. There is a problem with the code that must be loaded before your service provider and other frameworks run. it is interrupted when optimize is executed.

  2. An error occurred while updating the package using composer update.

  3. Updating interrupted in various situations during composer update, with incomplete dependencies

  4. Before composer update, artisan clear-compield is not run, so the old compilation file is not cleared.

  5. Optimize will write compiled. php and service. json map files in the bootstrap/cache/folder, and check the folder permissions.

However, it seems that you are using windows. you can ignore windows 5, and the four are the most likely.

Recommended solutions:

How to clear compiled files
  • Php artisan clear-compiled
    // Or configure pre-update-cmd in composer. json to prevent further problems.

  • Composer update

Use a composer without scripts to update and forcibly overwrite the previous compiled content.
  • Composer Upload ache

  • Composer update -- no-scripts

  • Php artisan optimize -- force

Brute force

If there is still a problem, delete the vendor Directory and composer. lock, use composer install -- no-scripts to reinstall, remember to run php artisan optimize -- force

Execute: composer install and try again

Php artisan route: list
Are you sure you have set the route?

Basic recommendations
Http://laravel-china.org/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.