1

I'm trying to update my magento version to 2.2 (from 2.1.7) but had a "Content Dependency" error, but have narrowed down the issue a module, the "module-wishlist-sample-data" magento module.

When I try to update composer I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/module-wishlist-sample-data 100.1.1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc2 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0-rc3 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.0 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - magento/module-wishlist-sample-data 100.1.1 requires magento/module-wishlist 100.1.* -> satisfiable by magento/module-wishlist[100.1.4, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0, 100.1.1, 100.1.2, 100.1.3, 100.1.5, 100.1.6].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc1].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc2].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0-rc3].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.0].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.1].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.2].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.3].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.4].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.5].
    - Can only install one of: magento/module-wishlist[101.0.0, 100.1.6].
    - magento/product-community-edition 2.2.0 requires magento/module-wishlist 101.0.0 -> satisfiable by magento/module-wishlist[101.0.0].
    - Installation request for magento/product-community-edition 2.2.0 -> satisfiable by magento/product-community-edition[2.2.0].
    - Installation request for magento/module-wishlist-sample-data 100.1.* -> satisfiable by magento/module-wishlist-sample-data[100.1.1, 100.1.0-rc1, 100.1.0-rc2, 100.1.0-rc3, 100.1.0].

Any ideas on how to solve this?

2 Answers 2

7

what you should do is:

  1. Remove from your composer.json all the sample data modules.
  2. Run composer update.
  3. Run "php -f bin/magento sampledata:deploy" this will add the latest sample data modules to your composer.json based on your M2 version.

That should be enough.

5
  • 1
    Thanks! What is the correct way to remove all the sample data from composer.json? Commented Oct 20, 2017 at 10:14
  • Edit the composer.json using your prefered text editor, just remove the lines like "magento/module- * -sample-data". Last option I think is to set every sample data to * (example "magento/module-catalog-sample-data": " * "), this will update it to the latest possible version validating it's valid for all the rest of the modules Commented Oct 20, 2017 at 10:18
  • Nice to hear that! please do not forget to mark this question as solved. Kind regards Commented Oct 25, 2017 at 10:24
  • Thanks a lot We can use command to remove sampledat : php bin/magento sampledata:remove Commented Feb 23, 2018 at 9:14
  • @MatiasHidalgo After i followed your instruction i getting an error like:: snag.gy/fP90NA.jpg could you kindly help me to get out this issue? my composer.json file is :: justpaste.it/2km8p
    – Gem
    Commented Apr 19, 2018 at 12:01
2

We could also uninstall the sample modules by command line.

php bin/magento module:uninstall Sample_Module_Data

It is more secure than edit the composer.json directly, it will auto puts the store in maintenance mode. And has some smart option to set, like --remove-data.

More details you could see the official guide Uninstall modules.

After uninstall, you could reinstall the latest sample data or just leave it.

php bin/magento sampledata:deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.