The installation of ThinkPHP reported an error. Could not find package topthink / think with stability stable

Install ThinkPHP and execute the command

composer create-project topthink/think tp5 --prefer-dist

report errors

 [InvalidArgumentException]
Could not find package topthink/think with stability stable.

resolvent:

    delete the previous image

    composer config -g --unset repos.packagist
    
      run the install ThinkPHP command

      composer create-project topthink/think tp5 --prefer-dist
      

      success!!!

Read More: