cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4.1 deploy sample data failed

Magento 2.4.1 deploy sample data failed

Composer version 2.1.3

Magento CLI 2.4.2-p1

 

bin/magento sampledata:deploy

 

<warning>Warning from https://repo.packagist.org : Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/ </warning>

 

Please help..

6 REPLIES 6

Re: Magento 2.4.1 deploy sample data failed

@_Martin_ ,

you need to reinstall your composer to the latest .

try 

composer self-update --2

if this doesn't work then try with the composer.phar.

 

 

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"

it will create a file "composer.phar". 

 

if you have sudo/root user you can move this to bin folder to use globally 

mv composer.phar /usr/local/bin/composer

 

 

if you don't have sudo/root user then you can use this for composer as 

php composer.phar update

--

Kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 

Re: Magento 2.4.1 deploy sample data failed

Though it might not be relevant anymore (because of newer Magento versions and the date of this post), I see the wrongness of the earlier answer, so felt I wanted to reply anyway.

 

The reply of Amit suggests that you are using composer 1 on the CLI which is causing the error. That's incorrect, because you posted already that you are using composer 2. In short: Your composer version is fine, don't change it to fix the issue you are having - even though upgrading to the latest version might always be a good idea.

 

The warning on installing sample data is a warning, not an error. Warnings can be disregarded. So I assume the installation of sample data worked after all. Errors might be stopping you, warnings usually don't.

 

The reason this warning is given is that your composer command (which correctly uses v2) is triggering Magento-driven composer commands as well (which incorrectly still uses v1). The warning is something we can't easily fix. However, a next version of Magento will fix it. But note that the warning doesn't cause anything else but confusion.

Re: Magento 2.4.1 deploy sample data failed

Re: Magento 2.4.1 deploy sample data failed

Have you try switch php version from 7.3 to 7.4( Ex: 7.4.9)?

Kevin-R gb whatsapp

Re: Magento 2.4.1 deploy sample data failed

Yes I have try this php version from 7.3 to 7.4( Ex: 7.4.9). This is so awesome , Thank you.

 

John_gb whatsapp

Re: Magento 2.4.1 deploy sample data failed

However it probably won't be significant any longer (in light of fresher Magento adaptations and the date of this post), I see the unsoundness of the previous response, so felt I needed to answer at any rate.

 

The answer of Amit proposes that you are utilizing arranger 1 on the CLI which is causing the mistake. That is inaccurate, in light of the fact that you posted currently that you are utilizing writer 2. In short: Your writer rendition is fine, don't transform it to fix the issue you are having - despite the fact that moving up to the furthest down the line form could constantly be smart.

 

The admonition on introducing test information is an admonition, not a mistake. Alerts can be ignored. So I accept the establishment of test information worked all things considered. Mistakes may be halting you, admonitions typically don't.