Install package on non-empty folder using composer

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.


For me giving the folder write access worked very well. On windows I right clicked on the mentioned folder and unchecked the Read Only checkbox and saved it and it worked. May be you could also give it a try hope it will work for you as well.


You can check all the . files in the folder.

$ ls -la

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