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 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体