[Solved] Fatal error: Class ‘think\Container‘ not found & [InvalidArgumentException] Could not find package

Fatal error: class’ think \ container ‘not found. This error means that the ThinkPHP core framework warehouse is not a branch of version 5.1, so the container of version 5.1 is not found;

The solution is to execute the following command on the terminal terminal of the IDE:

composer create-project topthink/think tp 5.1.35

Starting from tp5.1, the official website no longer provides a full version download, but can only be installed through the composer method.

[invalidargumentexception] could not find package. This error means that the installation package of the corresponding version is not found. The problem in the figure below is that the version number behind 5.1 is missing. It is correct after supplement as shown in the figure above.

  The program operation after correct input is as follows:


Read More: