Can't find the bin file installed globally in composer 2

Can’t find the bin file you installed as follows.

composer global require --dev phpstan/phpstan ^0.12 vimeo/psalm ^3.11

/home/travis/.travis/functions: line 109: /home/travis/.composer/vendor/bin/phpstan: No such file or directory

This works fine when I try it with composer 1 or local installation, it only doesn’t work with composer 2 in Travis CI. Note that I am trying to clear the cache.

Hey @koriym,

Think this link will help you out:

Ummm… It didn’t work.

composer global exec also didn’t work. It’s not about the environment variable?

Since this is a problem with 3rd-party software you install, it’s your job to diagnose it.

E.g. see the directory structure (ls -R) to verify what a command actually installs.

I suggest you look into Composer 2 documentation. The last successful job used 1.10.15

and the first failure is using 2.0.4

Their working directories seem different (~/.composer vs ~/.config/composer), too.

1 Like
Imprint