Why do I get a laravel error while creating a new project?

后端 未结 11 2083

When I type laravel new blog I get the following error.

In RequestException.php line 113:

Server error: GET http://cabinet.laravel.com/latest.zi

相关标签:
11条回答
  • 2021-02-01 02:05
    1. You need to update the installer to the latest version.

    laravel-news.com/updating-the-laravel-installer

    composer global require "laravel/installer:^4.0"
    
    1. after update you check your version using: laravel --version and you should get output like Laravel Installer 4.0.3
    0 讨论(0)
  • 2021-02-01 02:05

    try to update laravel/installer globally via:

    composer global update laravel/installer
    

    if it didn't work then you can try to remove and install it again:

    composer global remove laravel/installer 
    composer global require laravel/installer
    
    0 讨论(0)
  • 2021-02-01 02:06

    Another issue I was having is that my env variable for Composer\vendor\bin was stored within a windows.old folder and I could not find username/AppData in the normal place. Make sure you show all hidden folders and select the bin folder from the right root folders.

    0 讨论(0)
  • 2021-02-01 02:07

    The simplest way to update to the next major version of the installer is via composer require to globally require it:

    composer global require "laravel/installer:^4.0"
    

    Worked for me.

    0 讨论(0)
  • 2021-02-01 02:09

    The latest Laravel installer will be essential to your workflow which includes support for Jetstream.

    The new version also uses composer create-project behind the scenes instead of downloading an archive from Laravel’s build servers.

    Update the latest version of laravel/installer with any of the following approaches:

    1. Update to ^4.0 via composer require
    composer global require "laravel/installer:^4.0"
    
    1. Uninstall and Re-install the package via Composer
    composer global remove laravel/installer
    composer global require laravel/installer
    
    1. Update the global composer.json file and run composer update
    {
        "require": {
            "laravel/installer": "^4.0",
        }  }
    
    composer global update
    

    Verifying the Update

    laravel --version
    

    Click here to know more about updating the Laravel Installer

    0 讨论(0)
  • 2021-02-01 02:11

    If none of the above works, try this:

    composer create-project --prefer-dist laravel/laravel name of your project
    
    0 讨论(0)
提交回复
热议问题