Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install package on non-empty folder using composer

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. 
like image 919
Abudayah Avatar asked Oct 14 '14 08:10

Abudayah


2 Answers

You currently can't. 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 vice-versa.

like image 107
Prisoner Avatar answered Sep 22 '22 02:09

Prisoner


You can check all the . files in the folder.

$ ls -la 

Delete any . file in the folder and try again. It worked for me.

like image 36
Sudhanshu Bajaj Avatar answered Sep 23 '22 02:09

Sudhanshu Bajaj