Install package on non-empty folder using composer

Abudayah picture Abudayah · Oct 14, 2014 · Viewed 51.2k times · Source

I tried to install package via composer but it's keep telling me that this directory is not empty so how can I install package on non-empty folder using composer ? is there force install command ?

error message:

  [InvalidArgumentException]
  Project directory Yii-GZero-2b/ is not empty.

Answer

Prisoner picture Prisoner · Oct 14, 2014

You currently cant. There is/was a discussion going on over on GitHub which you can read about here: https://github.com/composer/composer/issues/1135.

For now however, you'll need to create a new directory and then migrate your files over, or visa-versa.