cancel
Showing results for 
Search instead for 
Did you mean: 

how to solve "lock file but not in remote repositories, make sure you avoid updating this package?

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.

 

 

 

 

hariprabhu rajan
1 REPLY 1

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.