yeswework / fabrica-dev-kit

A toolkit for faster, smoother WordPress 5 development
https://fabri.ca/
MIT License
274 stars 27 forks source link

Cannot run fdk setup #34

Closed TakenakaSimon closed 6 years ago

TakenakaSimon commented 6 years ago

I'm currently getting the current error when I run fdk setup, so trying to investiagte a fix for it

[Fabrica] 🕕  Waiting for 'test_wp' container...
[Fabrica] 🏭  Web server running at port 32771
the input device is not a TTY
[Fabrica] 🏭  Installing WordPress...
the input device is not a TTY
[Fabrica] ⚠️  Failed to execute: 'docker-compose exec -u www-data wp wp rewrite structure "/%postname%/"'

If I try running the failed command on its own:

➜  config git:(master) ✗ docker-compose exec -u www-data wp wp rewrite structure "/%postname%/"
Error: The site you have requested is not installed.
Run `wp core install` to create database tables.
TakenakaSimon commented 6 years ago
docker-compose exec -u www-data wp wp core install --url=a --title=b --admin_user=c --admin_email=d@d.com
docker-compose exec -u www-data wp wp rewrite structure "/%postname%/"

I had to manually enter the above 2 commands, I still got an error message when running fdk setup, but at least gulp will now run.

Tested using the latest version of fdk + node 10.

andrewstaffell commented 6 years ago

Hello @TakenakaSimon,

Firstly, thanks for using FDK.

This appears to be the result of a breaking change in Docker: https://github.com/docker/compose/issues/5696

A temporary workaround is to run export COMPOSE_INTERACTIVE_NO_CLI=1 from the command line just before you run fdk setup. I've just tested this and it works fine.

In the case where you've run fdk setup and it's thrown the errors, as you reported, you can run the command above and then fdk setup --reinstall and it will resume and should complete fine.

We are looking at incorporating this (or an equivalent) fix in the installer and will post the update and close the issue once that's done.