- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to solve "lock file but not in remote repositories, make sure you avoid updating this package?
hello folks, i tried to upgrade my magento 2.4.3-p1 version to 2.4.5-p3 .
i cloned it from the private github repo. then after i start to upgrade the version using by composer in my local machine. i got stucked in this step. only few articles avail related to this but those also don't have a answers.
the command i used in terminal : composer update
** error **
Problem 1 - Root composer.json requires stripe/stripe-payments ^3.3.0, found stripe/stripe-payments[3.3.0] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file. Problem 2 - Root composer.json requires weltpixel/module-google-tag-manager ^1.10.18, found weltpixel/module-google-tag-manager[1.10.18] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: how to solve "lock file but not in remote repositories, make sure you avoid updating this p
Hi @hariprabhuffa5,
It seems your are using unsupported composer version.
Check the current composer version with:
composer -V
The 1.0.0 version of magento/composer-root-update-plugin requires composer-plugin-api ^1.0, so it's not compatible with Composer2. You can check out repository in more detail here.
If you just recently updated the composer you can run a rollback
composer self-update --rollback
Or install the latest release of version 1:
composer self-update --1
- Check Repository Availability: Ensure that the packages stripe/stripe-payments and weltpixel/module-google-tag-manager are available in the repositories specified in your composer.json. You can verify this by visiting the respective repository URLs or checking with the package maintainers.
- Check Package Versions: Make sure that the versions specified in your composer.json are correct and correspond to existing versions in the repositories. It's possible that the specified versions are outdated or incorrect.
- Update composer.json: If the packages are no longer available or if you want to avoid updating them, you can modify your composer.json file to exclude the problematic packages from being updated. You can do this by specifying exact versions or using version constraints that exclude the problematic versions.
For example, if you want to avoid updating stripe/stripe-payments and weltpixel/module-google-tag-manager, you can specify exact versions in your composer.json like this:
"require": { "stripe/stripe-payments": "3.3.0", "weltpixel/module-google-tag-manager": "1.10.18", // Other dependencies... }
Run composer update --ignore-platform-reqs: If you're sure that the specified versions are correct and you want to proceed with the update without resolving the package availability issues, you can use
--ignore-platform-reqs
option to bypass platform requirements during the update run command like:
composer update --ignore-platform-reqs
once Magento is upgraded (in my case to 2.4.4), now composer update without ignore flag works as normal.
If you have still any queries than you can contact us we would like to assist you further.
If the issue will be resolved, Click Kudos & Accept as a Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: how to solve "lock file but not in remote repositories, make sure you avoid updating this p
It looks like you're encountering issues with Composer during your Magento upgrade, specifically related to package versions that are in your composer.lock file but not available in remote repositories. Here’s how to resolve these issues:
Steps to Resolve Composer Issues
Check the Lock File:
- Ensure that your composer.lock file is up-to-date with the composer.json file. If it’s outdated, you might need to update it to reflect current package versions.
Remove Specific Packages Temporarily:
- To bypass the issue with the problematic packages, you can try temporarily removing them from composer.json and running composer update. For example, remove stripe/stripe-payments and weltpixel/module-google-tag-manager from your composer.json, then run:bashCopy codecomposer update
- To bypass the issue with the problematic packages, you can try temporarily removing them from composer.json and running composer update. For example, remove stripe/stripe-payments and weltpixel/module-google-tag-manager from your composer.json, then run:
Manually Update the Lock File:
- If the packages are not available in the repositories anymore, you might need to update the composer.lock file manually. This could involve removing the package references from the composer.lock file and re-running the update command. However, be cautious as this might cause other issues if not done properly.
Check Repositories:
- Ensure that the repositories specified in your composer.json include all sources for the required packages. Verify that they are up and running, and include the correct versions of the packages.
Clear Composer Cache:
- Sometimes clearing the Composer cache can resolve issues with package retrieval:bashCopy codecomposer clear-cache
- Sometimes clearing the Composer cache can resolve issues with package retrieval:
Check Package Versions:
- Make sure the version constraints in composer.json are correct and available in the repositories. Sometimes, packages may have been removed or updated, and you might need to adjust the version constraints accordingly.
Use --ignore-platform-reqs:
- As a last resort, you can try using the --ignore-platform-reqs flag, though it’s not generally recommended as it ignores platform requirements which might lead to other issues:bashCopy codecomposer update --ignore-platform-reqs
- As a last resort, you can try using the --ignore-platform-reqs flag, though it’s not generally recommended as it ignores platform requirements which might lead to other issues:
Example Command Sequence
Here’s a brief sequence of commands to try:
Remove problematic packages temporarily:
bashCopy codecomposer remove stripe/stripe-payments weltpixel/module-google-tag-managerUpdate Composer:
bashCopy codecomposer updateRe-add packages with specific versions if needed:
bashCopy codecomposer require stripe/stripe-payments:^3.3.0 weltpixel/module-google-tag-manager:^1.10.18
Final Notes
- Backup: Always ensure you have a backup of your composer.json and composer.lock files before making significant changes.
- Documentation: Check the Magento and package documentation for any additional specifics related to upgrades or package requirements.