Closed p-mceldowney closed 2 years ago
What is your Composer and private-composer-installer version?
BTW Now you can say t={%VERSION}
private-composer-installer is v5.0.1 Composer is 2.0.3 i did just notice that my remote server is still on composer 1. I'm guessing that could be the issue?
And yeah, I used to use t={%VERSION} but after the October PR it was throwing errors for me for some reason
Yes, Composers should be on a matching version. I recommend v1 as v2 is still fragile.
Composer is 2.0.3
Please upgrade that, it has a grave error.
Okay i upgraded to 2.0.8. Sorry I'm a bit all over the place right now, but my local server is a vagrant box that's actually on composer 1.10.17 and my remote host is on 1.10.5. My local machine is what's running 2.0.8
Do you think upgrading my vagrantbox and remote server to Composer 2 will fix this issue? I had issues with private-composer-installer after upgrading to Composer 2 once before but I know where I went wrong with that now.
If there is a bug in private-composer-installer I hope it'll be fixed. So I suggest you to run with Composer v1 everywhere then with v2.
okay. what's weird about the bug I'm currently getting is that i accidentally had the private-composer-installer version requirement for advanced custom fields set to v5.1 (which isn't even an available version). No error was thrown about that for almost a month and then today I finally got an error about the v5.1 when I ran composer update
. So changed the line "ffraenz/private-composer-installer": "^5.1",
to "ffraenz/private-composer-installer": "^5.0",
. And now i'm getting the "Class
'FFraenz\PrivateComposerInstaller\Environment\LoaderFactory' not found" error on deployment
What is Composer version that generated the lock file and then installed packages in the other environment? I hope these two are the same!
Class 'FFraenz\PrivateComposerInstaller\Environment\LoaderFactory' not found in /www/{site_name}/public/releases/129232182/vendor/ffraenz/private- composer-installer/src/PrivateComposerInstaller/Plugin.php:102
src/PrivateComposerInstaller/
existed up to v4!!!
So changed the line
"ffraenz/private-composer-installer": "^5.1",
to"ffraenz/private-composer-installer": "^5.0",
Maybe you haven't updated the lock file. Try running composer validate --strict
I ran composer update from my local machine that is set to composer v2.0.8. And the composer version on my remote server is v1.10.5. And running composer validate --strict
just gives a few warnings about using exact version constraints
So my remote server does appear to not have an updated lock file. The composer.json has "ffraenz/private-composer-installer": "^5.0"
but the lock file has "ffraenz/private-composer-installer": "^5.1"
.
My job is to run web applications therefor I wouldn't like to give advises. All my knowledge is public.
update:
I've updated everything to run composer 2.0.8 and am still getting 'FFraenz\PrivateComposerInstaller\Environment\LoaderFactory' not found
on deployment. I've tried deleting the lock file on my remote server and running composer install again with no luck
I help you for 15 minutes for free viktor@szepe.net
We could start with deleting vendor/
As of the different capabilities offered by the Composer Plugin Interface you can't downgrade from Composer 2 to Composer 1 when using ffraenz/private-composer-installer
as the package dist URLs get encoded differently in composer.lock
. You need to upgrade to Composer 2 and use it consistently throughout all environments. The error message you describe may occur when upgrading libraries that have already been loaded into the current PHP context. To fix it, you should try to upgrade dependencies like phpdotenv
and private-composer-installer
one by one.
For some reason i'm getting this error when deploying my site after I ran
composer update
.The error happens at this stage in the deployment
Installing advanced-custom-fields/advanced-custom-fields-pro (5.9.1)
. It's been working fine for months now, so I'm not sure what's going on. Everything works on my local also.Here's my ACF declaration in my
composer.json
file.Has anyone had this issue before?
This site is hosted on Kinsta and is built using trellis/bedrock/sage.