clean-docker / Magento2

Docker Image to Magento 2 local development in Mac, Linux and Windows
https://hub.docker.com/r/rafaelcgstz/magento2/
MIT License
444 stars 251 forks source link

My application does not load sample data. #104

Closed matheusfrancisco closed 4 years ago

matheusfrancisco commented 4 years ago

My application does not load sample data. The only mistake appeared


'/var/www/env.sample.php' -> './app/etc/env.php'
/ usr / local / bin / install-magento2: line 27: n98: command not found
Index mode for Indexer Design Config Grid has not been changed
Index mode for Indexer Customer Grid has not been changed
Index mode for Indexer Category Products has not been changed
Index mode for Indexer Product Categories has not been changed
Index mode for Indexer Product Price has not been changed
Index mode for Indexer Product EAV has not been changed
Index mode for Indexer Stock has not been changed
Index mode for Indexer Catalog Rule Product has not been changed
Index mode for Indexer Catalog Product Rule has not been changed
Index mode for Indexer Catalog Search has not been changed
cp: -r not specified; omitting directory '/var/www/.composer/auth.json'```

I need a little help.

Thank you very much
JackWormUK commented 4 years ago

it hasnt installed all of the required pre installation modules or it crashed out on a download somewhere. I had this REALLY annoying n98 error as well. Uninstall everything and re-install everything. I think by my 3rd or 4th reinstall it had finally downloaded and cached everything and it worked fine.

matheusfrancisco commented 4 years ago

it hasnt installed all of the required pre installation modules or it crashed out on a download somewhere. I had this REALLY annoying n98 error as well. Uninstall everything and re-install everything. I think by my 3rd or 4th reinstall it had finally downloaded and cached everything and it worked fine.

hey thank you for your answer, but this not worked for me :'(

matheusfrancisco commented 4 years ago

I trying run this command but don't worked

$ php -f ./bin/magento sampledata:deploy

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
<warning>Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.</warning>
Generating autoload files
matheusfrancisco commented 4 years ago

I solved run this comands:

$ ./shell 
inside html/
$ rm -rf *

then I run:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition . ;
php -f ./bin/magento setup:install --base-url=http://localhost/ \
    --db-host=db \
    --db-name=magento \
    --db-user=magento \
    --db-password=magento \
    --admin-firstname=Magento \
    --admin-lastname=Commerce \
    --admin-email=user@example.com \
    --admin-user=admin \
    --admin-password=admin123 \
    --language=en_US \
    --currency=USD \
    --timezone=America/Chicago \
    --use-rewrites=1 \
    --backend-frontname=admin \
    --use-sample-data ;
php -f ./bin/magento indexer:set-mode schedule \
&& cp ~/.composer/auth.json var/composer_home/auth.json \
&& php -f ./bin/magento sampledata:deploy \
&& php -f ./bin/magento setup:upgrade \
&& php -f ./bin/magento indexer:reindex \
&& php -f ./bin/magento cache:flush \
&& php -f ./bin/magento deploy:mode:set production \
&& composer dump-autoload -o ;
mv package.json.sample package.json ; mv Gruntfile.js.sample Gruntfile.js \
&& npm i

php bin/magento setup:udpgrade
php bin/magento setup:static-content:deploy 

But i think only this command solve this problem : To install sample data please using the command line: php bin/magento sampledata:deploy

After completing downloading the sample data packages, run the below commands line:

php bin/magento setup:static-content:deploy (Applying for Magento 2.1.x)

php bin/magento setup:static-content:deploy -f (Applying for Magento 2.2.x)