WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.34k stars 4.13k forks source link

wp-env not starting on fresh Mac M2 install #59253

Open khromov opened 6 months ago

khromov commented 6 months ago

Description

I'm having issue getting wp-env running on a fresh Mac Sonoma install using Docker Desktop.

wp-env start
⚠ Warning: could not find a .wp-env.json configuration file and could not determine if '/Users/stanislav.khromov@x/Documents/GitHub/wp-demo' is a WordPress installation, a plugin, or a theme.
✖ Error while running docker compose command.
#0 building with "desktop-linux" instance using docker driver

#1 [wordpress internal] load build definition from WordPress.Dockerfile
#1 transferring dockerfile: 2.02kB done
#1 DONE 0.0s

#2 [tests-wordpress internal] load build definition from Tests-WordPress.Dockerfile
#2 transferring dockerfile: 2.03kB done
#2 DONE 0.0s

#3 [tests-wordpress internal] load metadata for docker.io/library/wordpress:latest
#3 DONE 0.4s

#4 [tests-wordpress internal] load .dockerignore
#4 transferring context: 2B done
#4 DONE 0.0s

#5 [wordpress internal] load .dockerignore
#5 transferring context: 2B done
#5 DONE 0.0s

#6 [wordpress  1/19] FROM docker.io/library/wordpress:latest@sha256:9acb6958caf4d95ffa4632a2b8d1de41e7c0286b0f94c2d4b74ce6e09a3fd5cb
#6 DONE 0.0s

#7 [wordpress 16/19] RUN export COMPOSER_HASH=`curl -sS https://composer.github.io/installer.sig` && php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$COMPOSER_HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('/tmp/composer-setup.php'); } echo PHP_EOL;"
#7 CACHED

#8 [wordpress 11/19] RUN apt-get -qy install sudo
#8 CACHED

#9 [wordpress 18/19] RUN rm /tmp/composer-setup.php
#9 CACHED

#10 [wordpress  2/19] RUN touch /etc/apt/sources.list
#10 CACHED

#11 [wordpress  6/19] RUN groupadd -o -g 20 stanislav.khromov@x || true
#11 CACHED

#12 [wordpress  7/19] RUN useradd -mlo -u 501 -g 20 stanislav.khromov@x || true
#12 CACHED

#13 [wordpress  4/19] RUN sed -i 's|security.debian.org/debian-security stretch|archive.debian.org/debian-security stretch|g' /etc/apt/sources.list
#13 CACHED

#14 [wordpress 13/19] RUN echo 'upload_max_filesize = 1G' >> /usr/local/etc/php/php.ini
#14 CACHED

#15 [wordpress 12/19] RUN echo "#501 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
#15 CACHED

#16 [wordpress 17/19] RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
#16 CACHED

#17 [wordpress 15/19] RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
#17 CACHED

#18 [wordpress 14/19] RUN echo 'post_max_size = 1G' >> /usr/local/etc/php/php.ini
#18 CACHED

#19 [wordpress  3/19] RUN sed -i 's|deb.debian.org/debian stretch|archive.debian.org/debian stretch|g' /etc/apt/sources.list
#19 CACHED

#20 [wordpress 10/19] RUN apt-get -qy install git
#20 CACHED

#21 [wordpress  5/19] RUN sed -i '/stretch-updates/d' /etc/apt/sources.list
#21 CACHED

#22 [wordpress  8/19] RUN apt-get -qy update
#22 CACHED

#23 [wordpress  9/19] RUN apt-get -qy install autoconf      dpkg-dev        file        g++         gcc         libc-dev        make        pkg-config      re2c && touch /usr/local/etc/php/php.ini
#23 CACHED

#24 [wordpress 19/19] RUN composer global require --dev phpunit/phpunit:"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
#24 CACHED

#25 [tests-wordpress] exporting to image
#25 exporting layers done
#25 writing image sha256:28f0f0dba4c7f3136e8953267fd152e3417f5b16a8879b9dcbe98b352cceee34 done
#25 naming to docker.io/library/367711d110e135ebacde5f8c187e59c3-tests-wordpress done
#25 DONE 0.0s

#26 [wordpress] exporting to image
#26 exporting layers done
#26 writing image sha256:90ac7db78ee3c3640589aee5fddae78e0410864d138abe0490a01d15bbb759c7 done
#26 naming to docker.io/library/367711d110e135ebacde5f8c187e59c3-wordpress done
#26 DONE 0.0s

#27 [tests-cli internal] load build definition from Tests-CLI.Dockerfile
#27 transferring dockerfile: 1.85kB done
#27 DONE 0.0s

#28 [cli internal] load build definition from CLI.Dockerfile
#28 transferring dockerfile: 1.85kB done
#28 DONE 0.0s

#29 [cli internal] load metadata for docker.io/library/wordpress:cli
#29 DONE 0.3s

#30 [cli internal] load .dockerignore
#30 transferring context: 2B done
#30 DONE 0.0s

#31 [tests-cli internal] load .dockerignore
#31 transferring context: 2B done
#31 DONE 0.0s

#32 [tests-cli  1/14] FROM docker.io/library/wordpress:cli@sha256:34cc90e187e5bd956e88313aae3bb21ada41f55839d20b7ab1b9abca93c5bf53
#32 DONE 0.0s

#33 [tests-cli  3/14] RUN adduser -h /home/stanislav.khromov@x -G $( getent group 20 | cut -d: -f1 ) -u 501 stanislav.khromov@x || true
#33 CACHED

#34 [tests-cli  2/14] RUN addgroup -g 20 stanislav.khromov@x || true
#34 CACHED

#35 [tests-cli 12/14] RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
#35 CACHED

#36 [tests-cli  5/14] RUN apk --no-cache add autoconf       dpkg-dev dpkg       file        g++         gcc         libc-dev        make        pkgconf         re2c && touch /usr/local/etc/php/php.ini
#36 CACHED

#37 [tests-cli 11/14] RUN export COMPOSER_HASH=`curl -sS https://composer.github.io/installer.sig` && php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$COMPOSER_HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('/tmp/composer-setup.php'); } echo PHP_EOL;"
#37 CACHED

#38 [tests-cli 10/14] RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
#38 CACHED

#39 [tests-cli  7/14] RUN echo "#501 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
#39 CACHED

#40 [tests-cli  6/14] RUN apk --no-cache add sudo linux-headers
#40 CACHED

#41 [tests-cli  8/14] RUN echo 'upload_max_filesize = 1G' >> /usr/local/etc/php/php.ini
#41 CACHED

#42 [tests-cli  4/14] RUN apk update
#42 CACHED

#43 [tests-cli  9/14] RUN echo 'post_max_size = 1G' >> /usr/local/etc/php/php.ini
#43 CACHED

#44 [tests-cli 13/14] RUN rm /tmp/composer-setup.php
#44 CACHED

#45 [tests-cli 14/14] RUN composer global require --dev phpunit/phpunit:"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
#45 0.127 
#45 0.129 In Filesystem.php line 260:
#45 0.129                                                        
#45 0.129   /.composer does not exist and could not be created:  
#45 0.129                                                        
#45 0.129 
#45 0.129 global <command-name> [<args>...]
#45 0.129 
#45 ERROR: process "/bin/sh -c composer global require --dev phpunit/phpunit:\"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0\"" did not complete successfully: exit code: 1
------
 > [tests-cli 14/14] RUN composer global require --dev phpunit/phpunit:"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0":
0.127 
0.129 In Filesystem.php line 260:
0.129                                                        
0.129   /.composer does not exist and could not be created:  
0.129                                                        
0.129 
0.129 global <command-name> [<args>...]
0.129 
------
failed to solve: process "/bin/sh -c composer global require --dev phpunit/phpunit:\"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0\"" did not complete successfully: exit code: 1

Step-by-step reproduction instructions

npm -g i @wordpress/env
wp-env start

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Mamaduka commented 6 months ago

@t-hamano, do you think this is related to #59232?

t-hamano commented 6 months ago

This issue does not appear to be related to #59232.

failed to solve: process "/bin/sh -c composer global require --dev phpunit/phpunit:\"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0\"" did not complete successfully: exit code: 1

Looking at the error log above, it looks like the issue is the same as the issue below. It may be a problem specific to Mac OS.

https://github.com/WordPress/gutenberg/issues/51419#issuecomment-1623823176

github-actions[bot] commented 5 months ago

Hi, This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.