Creating laravel apps without internet connection

后端 未结 2 1593
情话喂你
情话喂你 2021-01-24 16:53

Does laravel 5.1 work without internet connection? I like to create a laravel new application when i execute laravel new test (with intenet connection) it works well; but when

2条回答
  •  不思量自难忘°
    2021-01-24 17:30

    Composer 2+:

    COMPOSER_DISABLE_NETWORK=1 laravel new myapp
    

    Troubleshooting:

    1. Check your composer version: composer --version - you may have to update to the latest version with composer self-update;
    2. Check you have a global cache: echo $COMPOSER_HOME - you may have to create a ~/.composer and set export COMPOSER_HOME="${HOME}/.composer" to your ~/.bashrc or ~/.zshrc - don't forget to close and open your terminal to apply the changes;
    3. If you get this error https://repo.packagist.org could not be fully loaded (Network disabled, request canceled: https://repo.packagist.org/packages.json), package information was loaded from the local cache and may be out of date, the laravel packages are not in the global cache. Run the command with internet enabled to download the files.

提交回复
热议问题