Where to find composer's global packages?

后端 未结 9 1471
星月不相逢
星月不相逢 2021-01-30 20:12

For a plugin for Sublime Text I was required to install a composer package globally.

In order to do this I had to run the following command:

composer glo         


        
相关标签:
9条回答
  • 2021-01-30 20:39

    It gets your composer home directory and i use composer version 2.0.8 on Win 10

    composer config --list --global | grep 'home'
    

    [home] C:/Users/youruser/AppData/Roaming/Composer

    0 讨论(0)
  • 2021-01-30 20:40

    On Windows, mine was /Users/taylor/AppData/Roaming/Composer/bin

    0 讨论(0)
  • 2021-01-30 20:40

    For composer v2:

    composer global config --list
    

    Check the output and find [vendor-dir] parameter. Or use grep:

    composer global config --list | grep "vendor-dir"
    
    0 讨论(0)
  • 2021-01-30 20:47

    You can query Composer to find where it has set the user $COMPOSER_HOME directory.

    composer config --list --global
    

    The '[home]' line refers to the default value of $COMPOSER_HOME.

    Just as a final confirmation - the 'yourname' part in the configuration, would very likely need to be updated with your own Windows username - composer config will say where it put the files.

    0 讨论(0)
  • 2021-01-30 20:48

    You may find in ~/.config/composer/vendor/bin

    0 讨论(0)
  • 2021-01-30 20:54

    Run the command

    composer config --list --global | grep -w home
    

    You can find the find the [home] with composer path, similar to this one.

    [home] /home/example_username/.config/composer
    
    0 讨论(0)
提交回复
热议问题