http://devdocs.magento.com/guides/v2.1/install-gde/install/sample-data-after-composer.html this does not work
there's an error, the requested package magento/module-sales-sample-data could not be found in any version, there may be a typo in the package name.
and same with all the packages magento 2.2
@eugenbg: I wasn't able to reproduce your error. I successfully deployed sample data to a clean local instance of Magento (Commerce v2.2-rc30 installed via Composer) by following the instructions on devdocs.
bin/magento sampledata:deploybin/magento setup:upgradebin/magento setup:di:compile
This doesn't appear to be a documentation issue.It could be related to your environment. If you feel like there's a problem with the Magento code, please create an issue in the magento/magento2 repo.
It's possible that you may not have access to the right Composer repos. There's a note about it in the RC installation topic in the Get the Composer metapackage section. I'm not sure if that also applies to sample data though.
Reopening this issue to gather more info. If this turns out to be a repo access issue, then the error message is insufficient. The error message comes from Composer though, I think, so we'd have to add a note to this topic in devdocs; like we did for the RC installation topic.
@eugenbg: What edition of Magento are you running? Commerce or Open Source?
Yeah, I think this is an access issue. Either you must use the same authentication keys to install both Magento and sample data--required for system upgrades--or, if you use different keys, both must have the same authorization.
Consider the following scenario:
I successfully install Magento Commerce v2.2.0-rc30 via Composer using authentication keys "authorized". When I attempt to install sample data using different authentication keys "unauthorized", I get errors.
In this scenario, I know that the "unauthorized" keys don't have access to the Magento Commerce Composer repo. What I don't know is what happens if someone tries installing sample data with different "authorized" keys.
Error output
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package magento/module-gift-card-sample-data could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package magento/module-customer-balance-sample-data could not be found in any version, there may be a typo in the package name.
Problem 3
- The requested package magento/module-target-rule-sample-data could not be found in any version, there may be a typo in the package name.
Problem 4
- The requested package magento/module-gift-registry-sample-data could not be found in any version, there may be a typo in the package name.
Problem 5
- The requested package magento/module-multiple-wishlist-sample-data could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
There is an error during sample data deployment. Composer file will be reverted.
According to internal Magento sources, you must use the same authentication keys to install Magento and sample data. I'll include a note in the Install sample data topic.
hi @jeff-matthews this is what fixed it for me: composer config repositories.0 composer https://repo.magento.com
i downloaded the release (2.2) from github releases page https://github.com/magento/magento2/releases i guess that's the same as downloading from magento.com
so looks like repo.magento.com was not added to composer.json as a repository in the release?
@eugenbg: Yes, if you clone or download Magento, your composer.json file will not include the "url": "https://repo.magento.com/" definition. The devdocs topic that you're referencing is intended for developers who installed Magento via Composer only.
There's a separate topic for installing sample data if you cloned the Magento Github repo.
I think it's still worth mentioning this in the topic.. it will save much time for those who stumble upon this error after all it's called "Install sample data using Composer", it doesn't say anything about the way you had installed magento
On Fri, Sep 15, 2017 at 7:27 PM, Jeff Matthews [email protected] wrote:
@eugenbg https://github.com/eugenbg: Yes, if you clone or download Magento, your composer.json file will not include the "url": " https://repo.magento.com/" definition. The devdocs topic that you're referencing is intended for developers who installed Magento via Composer only. There's a separate topic http://devdocs.magento.com/guides/v2.1/install-gde/install/sample-data-after-clone.html for installing sample data if you cloned the Magento Github repo.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/devdocs/issues/1416#issuecomment-329831940, or mute the thread https://github.com/notifications/unsubscribe-auth/ABma4JTinBIJcLcyFlYo0CNemW3K_zrVks5siqWCgaJpZM4PYo5- .
I think it's worth linking to the other non-Composer topic, but to be fair, the first paragraph is explicit:
This section discusses how to install sample data if you got the Magento software in any of the following ways:
- Downloaded a compressed archive
- Used composer create-project"
So I think a note below that pointing to the other topic is the best solution here:
If you cloned the repo, you need to install sample data a different way {insert link}.
I think it's important to note that downloading an archive from the Github repo isn't the same as downloading an archive from the official Magento download page.
Doc updates are live