Composer for premium extension not working
- This topic has 7 replies, 2 voices, and was last updated 1 year ago by
Peter.
-
AuthorPosts
-
April 13, 2024 at 8:49 AM #45206
Jai Ivarsson
ParticipantI'm trying to use composer to load a premium extension for the first time following these instructions https://docs.metabox.io/integration/#using-composer. Note in the below I have removed my actual license key for obvious reasons.
My composer.json file works if I only try for free extensions but when I run composer install or update I get this error:
curl error 23 while downloading https://packages.metabox.io/packages.php?key=<my-key>: Failed writing received data to disk/application
This is my composer.json file:
{ "repositories":[ { "type": "composer", "url": "https://wpackagist.org" }, { "type": "composer", "url": "https://packages.metabox.io/<my-key>" } ], "require": { "wpackagist-plugin/meta-box": "^5", "wpackagist-plugin/mb-settings-page": "dev-master" }, "extra": { "installer-paths": { "vendor/meta-box/{$name}": [ "vendor:wpackagist-plugin", "vendor:meta-box" ] } }, "autoload": { "files": [ "vendor/meta-box/meta-box/meta-box.php", "vendor/meta-box/mb-settings-page/mb-settings-page.php" ] }, "config": { "allow-plugins": { "composer/installers": true } }
Anyone know what could cause this?
April 13, 2024 at 8:47 PM #45211Peter
ModeratorHello Jai,
I check the composer feature on my local site but don't see that issue. Please double-check the key on your account and ensure it is correct.
April 14, 2024 at 6:10 AM #45213Jai Ivarsson
ParticipantThanks for your reply Peter.
The key definitely is fine as I have it working on multiple sites. But to make sure I generated a new one and tried that and got the same error.
April 14, 2024 at 10:05 PM #45217Peter
ModeratorHello,
It could be a permission issue. Please get in touch with your hosting support and ask them for more information about the error "curl error 23" when downloading a premium plugin from the URL https://packages.metabox.io/
Also, please share a screen record of the steps you do on your end.April 16, 2024 at 9:54 AM #45225Jai Ivarsson
ParticipantThanks Peter.
This curl error is returned running composer in my local dev environment. There isn't hosting involved.
To clarify, I'm running the composer command from my local terminal and getting that error.
April 16, 2024 at 10:29 PM #45234Peter
ModeratorHello,
Can you share a screen record of steps you do on the local site?
April 19, 2024 at 12:31 PM #45264Jai Ivarsson
ParticipantHi, I managed to fix this and thought I'd put the answer here for anyone else that comes across it.
Short answer is found on this page https://github.com/composer/composer/issues/11913
Seems that something with the a curl version installed on my Mac. Updating curl fixed it. Doesn't seem to have been the fix for everyone.
In particular this problem only happened when trying to download and install the premium extensions.
April 19, 2024 at 9:58 PM #45265Peter
ModeratorThanks for sharing the solution.
-
AuthorPosts
- You must be logged in to reply to this topic.