Closed stu177 closed 4 years ago
I used to have these too. In fact its not this packages fault. It is just how Magento works. In developer mode it uses symlinks for static assets. So if you create an artifact while in developer mode, when the package is "untared" elsewhere it will have invalid symlinks. The solution is just something in the lines of what the OP posted: get your site in production before deploy-artifacts.
Thanks @dareenzo.
@stu177 you should have your local copy in production mode.
I recommend that you have a separate folder that is a copy of your project and that it is in production mode.
This way you will deploy from your new folder.
Something I've noticed when building an artifact locally is if you're in developer mode, the artifact is built using the symlinks of your local environment. This casuses broken symlinks to be pushed to the remote.
I've been doing this to get around this issue:
Symlinks are set by the value for
view_preprocessed
inapp/etc/di.xml
:Which causes files in
pub/static/adminhtml/Magento/backend/en_GB
to be symlinks. I'm guessing symlinks are used in other places but this was the main issue for as it was breaking assets for the admin area.Not sure if anyone else has had this issue and have any other solutions?