«file_get_contents(<...>/composer.json): failed to open stream: No such file or directory» on «bin/magento sampledata:remove»

composer
bug
bin-magento
command-line
uninstall
sample-data
(Maged Mikhail) #1

When trying to uninstall the sample data in v2.1.0 using the following command:

php bin/magento sampledata:remove

I got the following error:

[Exception]
Warning: file_get_contents(vendor/mage2pro/core/Framework/composer.json): failed to
open stream: No such file or directory in vendor/magento/module-sample-data/Model/
Dependency.php on line 109

0 Likes

(Dmitry Fedyuk) #2

I am unable to reproduce it.
Give me SSH access, and I will check it on your server.

0 Likes

(Dmitry Fedyuk) #3

It is a Magento 2 core bug.
I have fixed it for my extensions in the 1.7.33 release of the mage2pro/core package.
Though, you will still have this issue for other third-party extensions.

0 Likes

(Alberto Ribeiro) #4

Hello,
I’m having the same problem. I uninstalled the module but when executing the following command:
php bin / magento sampledata: reset

the following error occurs:
[Exception]
Warning: file_get_contents(/home/plataformasescol/public_html/demo/vendor/m
age2pro/core/Core/composer.json): failed to open stream: No such file or di
rectory in /home/plataformasescol/public_html/demo/vendor/magento/module-sa
mple-data/Model/Dependency.php on line 109

0 Likes