Laravel Installer method

后端 未结 2 1825
梦谈多话
梦谈多话 2020-12-22 08:36

Normally I do install Laravel 5.1 by following this command regarding to documentation:

composer create-project laravel/laravel --prefer-dist
相关标签:
2条回答
  • 2020-12-22 09:23

    In addition to @WouterJ answer.

    Worst case if the steps provided by @WouterJ did not work, you could manage to uninstall and reinstall composer for windows.

    When done, run composer global update to be sure to get latest updates, if there was.

    Then run composer global require "laravel/installer=~1.1" and it should works.

    Remember to update your windows environment path C:\Users\UserName\AppData\Roaming\Composer\vendor\bin

    0 讨论(0)
  • 2020-12-22 09:26

    The Composer Assets Plugin you've installed locally is using a deprecated method of Composer. The plugin is already fixed, so run composer global update to get the latest versions with the bug fix. After it, you should be able to run the command succesfully.

    If this doesn't work (as you might get the same error running the previous command), try removing the global vendor directory. When running any global Composer command, it outputs something like "Changed current directory to XXX". Remove the XXX/vendor directory and then try running the command.

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