10up / wp-local-docker-v2

ARCHIVED: A simple Docker based development environment for WordPress.
MIT License
484 stars 82 forks source link

Impossible to create new websites #312

Closed LucaPipolo closed 1 year ago

LucaPipolo commented 2 years ago

Troubleshooting

Describe the bug

After a totally clean installation on a new machine (MacBook Pro 14'' M1 Pro) when I try to setup a new website using 10updocker create (does not matter what I choose in the following steps such as PHP version, WordPress installation, additional domains, etc.) I encounter the following errors:

  1. The SSL certificate is not generated.
    /bin/sh: /Users/lucapipolo/Library/Application: No such file or directory
    ⚠ Command failed: /Users/lucapipolo/Library/Application Support/fnm/node-versions/v16.16.0/installation/lib/node_modules/wp-local-docker/node_modules/mkcert-prebuilt/1.2.0.bin -CAROOT
    /bin/sh: /Users/lucapipolo/Library/Application: No such file or directory 
  2. The process never ends. It stuck forever on Rewrite rules structure is updated to /%postname%/... and never complete.

I already tried the trouble shooting techniques and did not help.

Steps to Reproduce

  1. Run 10updocker create

Screenshots, screen recording, code snippet

Schermata 2022-08-11 alle 20 24 34

Environment information

MacBook Pro Model: MacBook Pro 18,3 Chip: Apple M1 Pro Core Numbers: 8 RAM: 16 GB macOS Monterey 12.3 (21E230)

Docker 4.11.1 (84025) Engine: 20.10.17 Compose: 1.29.2 Kubernetes: v1.24.2

Node v.16.16.0 NPM 8.11.0 Installed using FNM

Code of Conduct

LucaPipolo commented 2 years ago

Not sure if this is related but I also now noticed that as well the delete process stuck forever ⬇️

Schermata 2022-08-11 alle 20 50 09

I'm not sure what wp-local-docker-v2 is supposed to do on /etc/hosts (during troubleshooting procedure I read something about this) but I suspect is not working since I do not see any change to the file and I have to manually add the host there.

mae829 commented 1 year ago

@LucaPipolo wp-local-docker-v2 is trying to add/delete in /etc/hosts the necessary entry to recognize the custom URLs locally. As far as your 1. point, I had this happen using fnm as well and it's due to the installation location path. Specifically the space in ../Application Support/.. not being escaped by a command for mkcert.

My workaround was to move the whole folder /Users/{your_user_name}/Library/Application Support/fnm to the root /Users/{your_user_name}/.fnm.

Notes:

Hope that helps for you or anyone using fnm and it was installed via brew.