-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ErrorException with copy strategy #23
Comments
which version of the installer are you using? |
I use latest version of installer and
then extensions are defined in their own composer.json as below
|
Any ideas? |
Hey, @mszterlingfsite . Pretty hard to figure this one out without reproducing it.
Is there any extension which behaves faulty and you can share? |
as you make use of the I assume the problem is created from existing symlinks, where the installer then removes one file inside this symlinked directory and then it tries to copy from there(?) |
Same thing happened to me (version constraint: The solution was to delete everything from where the composer installer may put them: N.B.: If there are any non-vcs files in those dirs that won't be deployed be MCI be sure you can restore those ( @mszterlingfsite fyi ☝️ I hope that helps. |
It happens because the symlinks are still there and if using extra.magento-force true then it is removing those files! |
I experienced the same problem. The issue is, as PascalBrouwers described, caused by the existence of a symlink to the vendor package. So consider the following situation: run composer install with deploy strategy "symlink", There are now symlinks to the vendor folder where the modules should be installed. Switch to deploy strategy copy and remove the vendor folder (now the symlinks do not resolve). see: MagentoHackathon\Composer\Magento\Deploystrategy\Copy.php line 74 Why is this the case? When running through ModuleManager doInstalls function there are various realpath calls done on either the vendor dir or the dir that should be created or linked (or whatever) in the magento codebase. I am not sure which one it is as I did not debug this properly however I am quite sure this results in the deletion of the file in the vendor dir. How to avoid this? Make sure when switching to deploy strategy copy that no symlinks which resulted from deploy strategy symlink are present in the project. Clean it all up. Somebody accedentally commited the symlink in Git (in my case) and this caused the issue. I did spend some time to figure out why this happened, therefor this update. It problably can be fixed by avoiding the use of realpath. |
Got very strange behaviour and cannot pinpoint where the problem is.
Using composer on over 10 projects and having issue only on one.
Everything works with symlink strategy (used in local environments), but problem happens when switching to copy.
To replicate I am clearing all caches
then clearing composer cache and running composer without cache
most of the extensions are installed and then one is complaining that source file is not there.
Error is
I've checked src/.modman/ folder and it looks like that particular file was checked out and then deleted by magento-composer-installer.
Code is there
I've checked that for sure target path does not exists in the project prior running composer
Can someone point me what is going on?
If I use composer cache - it will happen with other extension on composer list. Also this extension is used on other projects and composer works as expected.
The text was updated successfully, but these errors were encountered: