drxt70655 2018-06-08 13:42
浏览 385
已采纳

仅半满时,Composer全盘错误

This is my first time using composer. I am trying to build a project that uses it but I cannot get composer to function properly. For the command composer diagnose I get the following every time:

PS C:\WinNMP\WWW\Oro> composer diagnose
Checking composer.json: WARNING
Defining autoload.psr-4 with an empty namespace prefix is a bad idea for performance
License "Commercial" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: FAIL
The disk hosting C:/Users/Mark/AppData/Roaming/Composer is full

All other tests return OK. My disk has 64gb free. I tried searching for this issue but found little help. I upped the memory limit in php to 512mb as a shot in the dark without effect. Some posts related to this suggested it was out of memory but my ram never goes above 35% usage.

I tried running composer clear-cache without any effect.

Trying to run this on php 7.2.6, composer 1.6.5

  • 写回答

1条回答 默认 最新

  • dtkp51520 2018-06-08 14:22
    关注

    The function that triggers this error message is this:

    private function checkDiskSpace($config)
    {
        $minSpaceFree = 1024 * 1024;
        if ((($df = @disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)
            || (($df = @disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)
        ) {
            return '<error>The disk hosting '.$dir.' is full</error>';
        }
    
        return true;
    }
    

    You may want to write a little script that makes the same check, except that without error suppression. To get the values for homeand vendor-dir you can run these commands:

    composer config home
    composer config vendor-dir
    

    A rough idea:

    $home = trim(`composer config home`);
    $vendorDir = trim(`composer config vendor-dir`);
    
    var_dump($home, disk_free_space($home));
    var_dump($vendorDir, disk_free_space($vendorDir));
    

    Don't forget to make sure that you have full error reporting enabled.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 聚类分析或者python进行数据分析
  • ¥15 如何用visual studio code实现html页面
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?