Issues when running yarn setup:tools for the first time
juanmaguitar opened this issue Β· 4 comments
I'm getting the following error when doing yarn setup:tools
for the first time after cloning the repo locally
- Installing yoast/phpunit-polyfills (1.x-dev 3abb63e): Extracting archive
43/43 [============================] 100%
In GitDownloader.php line 501:
Failed to execute git checkout '693a5181a113fadb4fa6d768977cbf74e579069c' -- && git reset --har
d '693a5181a113fadb4fa6d768977cbf74e579069c' --
fatal: reference is not a tree: 693a5181a113fadb4fa6d768977cbf74e579069c
It looks like the commit hash is not available in the repository, maybe the commit was removed
from the branch? Run "composer update wporg/wporg-mu-plugins" to resolve this.
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
See full output when yarn setup:tools
yarn run v1.22.19 $ yarn && composer install && TEXTDOMAIN=wporg composer exec update-configs && composer --working-dir=./source/wp-content/plugins/phpdoc-parser install [1/4] π Resolving packages... [2/4] π Fetching packages... [3/4] π Linking dependencies... warning " > @wordpress/scripts@27.1.0" has unmet peer dependency "@playwright/test@^1.39.0". warning " > @wordpress/scripts@27.1.0" has unmet peer dependency "react@^18.0.0". warning " > @wordpress/scripts@27.1.0" has unmet peer dependency "react-dom@^18.0.0". warning "@wordpress/scripts > @wordpress/e2e-test-utils-playwright@0.18.0" has unmet peer dependency "@playwright/test@>=1". warning "@wordpress/scripts > cssnano@6.0.3" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default@6.0.3" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > @wordpress/eslint-plugin > @typescript-eslint/eslint-plugin > ts-api-utils@1.0.3" has unmet peer dependency "typescript@>=4.2.0". warning "@wordpress/scripts > cssnano > cssnano-preset-default > cssnano-utils@4.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-colormin@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-convert-values@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-comments@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-duplicates@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-empty@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-overridden@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-merge-longhand@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-merge-rules@6.0.3" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-font-values@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-gradients@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-params@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-selectors@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-charset@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-display-values@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-positions@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-repeat-style@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-string@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-timing-functions@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-unicode@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-url@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-whitespace@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-ordered-values@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-reduce-initial@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-reduce-transforms@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-svgo@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-unique-selectors@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-merge-longhand > stylehacks@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > @wordpress/eslint-plugin > eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [4/4] π¨ Building fresh packages... Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:48 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:56 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:875 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:880 Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Package operations: 53 installs, 0 updates, 0 removals - Downloading composer/installers (1.x-dev 894a0b5) - Downloading squizlabs/php_codesniffer (dev-master 4fd52f7) - Downloading myclabs/deep-copy (1.x-dev 2f52946) - Downloading nikic/php-parser (1.x-dev c4bbc8e) - Downloading phpcompatibility/php-compatibility (9.3.5) - Downloading phpcompatibility/phpcompatibility-paragonie (1.3.3) - Downloading phpcompatibility/phpcompatibility-wp (dev-master 01c1ff2) - Downloading sebastian/recursion-context (3.0.x-dev 9bfd3c6) - Downloading sebastian/exporter (3.1.x-dev 1939bc8) - Downloading sebastian/diff (3.0.x-dev 98ff311) - Downloading phpdocumentor/reflection-docblock (2.0.5) - Downloading doctrine/instantiator (1.5.x-dev 12be248) - Downloading phpspec/prophecy (v1.10.3) - Downloading theseer/tokenizer (1.2.3) - Downloading sebastian/version (2.0.1) - Downloading sebastian/environment (4.2.x-dev 56932f6) - Downloading sebastian/code-unit-reverse-lookup (1.0.x-dev 92a1a52) - Downloading phpunit/php-text-template (1.2.1) - Downloading phpunit/php-file-iterator (2.0.x-dev 69deeb8) - Downloading phpunit/php-timer (2.1.x-dev a691211) - Downloading rmccue/requests (v1.8.1) - Downloading sebastian/object-reflector (1.1.x-dev 1d439c2) - Downloading sebastian/object-enumerator (3.0.x-dev ac5b293) - Downloading sebastian/resource-operations (2.0.x-dev 72a7f76) - Downloading scribu/scb-framework (dev-master d35d512) - Downloading scribu/lib-posts-to-posts (dev-master a695438) - Downloading phpdocumentor/reflection (3.0.x-dev 59e61ac) - Downloading erusev/parsedown (1.8.0-beta-7) - Syncing wordpress/phpdoc-parser (dev-master 7fc2227) into cache - Downloading wp-coding-standards/wpcs (2.3.0) - Downloading wp-phpunit/wp-phpunit (5.9.9) - Downloading wpackagist-plugin/code-syntax-block (3.2.0) - Downloading wpackagist-plugin/gutenberg (18.2.0) - Downloading wpackagist-plugin/jetpack (13.4-beta) - Downloading wpackagist-plugin/posts-to-posts (1.7.3) - Downloading wpackagist-plugin/wordpress-importer (0.8.2) - Downloading adhocore/jwt (1.1.2) - Syncing wporg/wporg-mu-plugins (dev-build 693a518) into cache - Syncing wporg/wporg-parent-2021 (dev-build d4e52af) into cache - Syncing wporg/wporg-repo-tools (dev-trunk d78f1cf) into cache - Downloading yoast/phpunit-polyfills (1.x-dev 3abb63e) - Installing composer/installers (1.x-dev 894a0b5): Extracting archive - Installing squizlabs/php_codesniffer (dev-master 4fd52f7): Extracting archive - Installing dealerdirect/phpcodesniffer-composer-installer (v0.7.2): Extracting archive - Installing myclabs/deep-copy (1.x-dev 2f52946): Extracting archive - Installing nikic/php-parser (1.x-dev c4bbc8e): Extracting archive - Installing phar-io/version (2.0.1): Extracting archive - Installing phar-io/manifest (1.0.3): Extracting archive - Installing phpcompatibility/php-compatibility (9.3.5): Extracting archive - Installing phpcompatibility/phpcompatibility-paragonie (1.3.3): Extracting archive - Installing phpcompatibility/phpcompatibility-wp (dev-master 01c1ff2): Extracting archive - Installing sebastian/recursion-context (3.0.x-dev 9bfd3c6): Extracting archive - Installing sebastian/exporter (3.1.x-dev 1939bc8): Extracting archive - Installing sebastian/diff (3.0.x-dev 98ff311): Extracting archive - Installing sebastian/comparator (3.0.x-dev 1dc7ceb): Extracting archive - Installing phpdocumentor/reflection-docblock (2.0.5): Extracting archive - Installing doctrine/instantiator (1.5.x-dev 12be248): Extracting archive - Installing phpspec/prophecy (v1.10.3): Extracting archive - Installing theseer/tokenizer (1.2.3): Extracting archive - Installing sebastian/version (2.0.1): Extracting archive - Installing sebastian/environment (4.2.x-dev 56932f6): Extracting archive - Installing sebastian/code-unit-reverse-lookup (1.0.x-dev 92a1a52): Extracting archive - Installing phpunit/php-token-stream (3.1.x-dev 9c1da83): Extracting archive - Installing phpunit/php-text-template (1.2.1): Extracting archive - Installing phpunit/php-file-iterator (2.0.x-dev 69deeb8): Extracting archive - Installing phpunit/php-code-coverage (6.1.4): Extracting archive - Installing phpunit/php-timer (2.1.x-dev a691211): Extracting archive - Installing rmccue/requests (v1.8.1): Extracting archive - Installing sebastian/global-state (2.0.0): Extracting archive - Installing sebastian/object-reflector (1.1.x-dev 1d439c2): Extracting archive - Installing sebastian/object-enumerator (3.0.x-dev ac5b293): Extracting archive - Installing sebastian/resource-operations (2.0.x-dev 72a7f76): Extracting archive - Installing wordpress-meta/handbook (2): Checking out trunk/wordpress.org/public_html/wp-content/plugins/handbook/ - Installing wordpress-meta/pub (1): Checking out trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/ - Installing wordpress-meta/wporg-markdown (1): Checking out trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/ - Installing scribu/scb-framework (dev-master d35d512): Extracting archive - Installing scribu/lib-posts-to-posts (dev-master a695438): Extracting archive - Installing psr/log (1.1.4): Extracting archive - Installing phpdocumentor/reflection (3.0.x-dev 59e61ac): Extracting archive - Installing erusev/parsedown (1.8.0-beta-7): Extracting archive - Installing wordpress/phpdoc-parser (dev-master 7fc2227): Cloning 7fc2227d2d from cache - Installing wp-coding-standards/wpcs (2.3.0): Extracting archive - Installing wp-phpunit/wp-phpunit (5.9.9): Extracting archive - Installing wpackagist-plugin/code-syntax-block (3.2.0): Extracting archive - Installing wpackagist-plugin/gutenberg (18.2.0): Extracting archive - Installing wpackagist-plugin/jetpack (13.4-beta): Extracting archive - Installing wpackagist-plugin/posts-to-posts (1.7.3): Extracting archive - Installing wpackagist-plugin/wordpress-importer (0.8.2): Extracting archive - Installing adhocore/jwt (1.1.2): Extracting archive - Installing wporg/wporg-mu-plugins (dev-build 693a518): Cloning 693a5181a1 693a5181a113fadb4fa6d768977cbf74e579069c is gone (history was rewritten?) Install of wporg/wporg-mu-plugins failed - Installing wporg/wporg-parent-2021 (dev-build d4e52af): Cloning d4e52af3e7 d4e52af3e755c15787293e1fd1e25054af225eec is gone (history was rewritten?) Install of wporg/wporg-parent-2021 failed - Installing wporg/wporg-repo-tools (dev-trunk d78f1cf): Cloning d78f1cf7dc from cache - Installing phpunit/phpunit (7.5.20): Extracting archive - Installing yoast/phpunit-polyfills (1.x-dev 3abb63e): Extracting archive 43/43 [============================] 100% In GitDownloader.php line 501:Failed to execute git checkout '693a5181a113fadb4fa6d768977cbf74e579069c' -- && git reset --har
d '693a5181a113fadb4fa6d768977cbf74e579069c' --fatal: reference is not a tree: 693a5181a113fadb4fa6d768977cbf74e579069c
It looks like the commit hash is not available in the repository, maybe the commit was removed
from the branch? Run "composer update wporg/wporg-mu-plugins" to resolve this.install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I answered in slack, but to add it here for others:
If you run
composer update
, then you should be able to runyarn setup:tools
again. Thereβs a dependency thatβs updated frequently that can get out of date.
This is a common error, we should add something to explain this to the readme.
For reference, when doing composer update
I got this error
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:48
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:56
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:875
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:880
Loading composer repositories with package information
GitHub API limit (0 calls/hr) is exhausted, could not fetch https://api.github.com/repos/WordPress/wporg-mu-plugins/contents/composer.json?ref=ed9879d762f9c46edd98e01ab8b492dbaea95af0. Create a GitHub OAuth token to go over the API rate limit. You can also wait until ? for the rate limit to reset.
When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+Juans-MacBook-Pro-2.local+2024-05-07+1538 to retrieve a token.
This token will have read-only permission for public information only.
When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Juans-MacBook-Pro-2.local+2024-05-07+1538
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/Users/juanmanuelgarrido/.composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
Token (hidden):
This issue with the Composer command prompting for a GitHub token is due to hitting the API rate limit.
To solve it I followed these steps:
-
Generate a GitHub Personal Access Token:
- Visit the link provided on the log https://github.com/settings/tokens/new?scopes=&description=Composer+on+Juans-MacBook-Pro-2.local+2024-05-07+1538 to get a token for public GitHub repositories
- Generate a new personal access token with the necessary scopes. For public repositories, you can generate a token with read-only permissions.
- Copy the generated token.
-
Provide the GitHub Token to Composer:
- When Composer prompts for the token, paste the token you generated in the terminal and press Enter. The token will be stored in
~/.composer/auth.json
for future use by Composer.
- When Composer prompts for the token, paste the token you generated in the terminal and press Enter. The token will be stored in
-
Retry the Composer Command:
- After providing the token, you can rerun the
composer update
command to continue updating your dependencies:composer update
- After providing the token, you can rerun the
By following these steps, I properly authenticated with GitHub using the personal access token and proceed with the Composer command without hitting the API rate limit.
After running composer update
succesfully I ran yarn setup:tools
again and got another set of errors (this time I think they have to be with a specific PHP version required)
See full output when yarn setup:tools
yarn run v1.22.19 $ yarn && composer install && TEXTDOMAIN=wporg composer exec update-configs && composer --working-dir=./source/wp-content/plugins/phpdoc-parser install [1/4] π Resolving packages... [2/4] π Fetching packages... [3/4] π Linking dependencies... warning " > @wordpress/scripts@27.1.0" has unmet peer dependency "@playwright/test@^1.39.0". warning " > @wordpress/scripts@27.1.0" has unmet peer dependency "react@^18.0.0". warning " > @wordpress/scripts@27.1.0" has unmet peer dependency "react-dom@^18.0.0". warning "@wordpress/scripts > @wordpress/e2e-test-utils-playwright@0.18.0" has unmet peer dependency "@playwright/test@>=1". warning "@wordpress/scripts > cssnano@6.0.3" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default@6.0.3" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > @wordpress/eslint-plugin > @typescript-eslint/eslint-plugin > ts-api-utils@1.0.3" has unmet peer dependency "typescript@>=4.2.0". warning "@wordpress/scripts > cssnano > cssnano-preset-default > cssnano-utils@4.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-colormin@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-convert-values@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-comments@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-duplicates@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-empty@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-discard-overridden@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-merge-longhand@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-merge-rules@6.0.3" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-font-values@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-gradients@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-params@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-minify-selectors@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-charset@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-display-values@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-positions@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-repeat-style@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-string@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-timing-functions@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-unicode@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-url@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-normalize-whitespace@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-ordered-values@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-reduce-initial@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-reduce-transforms@6.0.1" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-svgo@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-unique-selectors@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > cssnano > cssnano-preset-default > postcss-merge-longhand > stylehacks@6.0.2" has incorrect peer dependency "postcss@^8.4.31". warning "@wordpress/scripts > @wordpress/eslint-plugin > eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [4/4] π¨ Building fresh packages... Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:48 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:56 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:875 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:880 Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating autoload files 20 packages you are using are looking for funding. Use the `composer fund` command to find out more! Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:48 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:56 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:875 Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:880 Copying .eslintrc.js to /Users/juanmanuelgarrido/PROJECTS/2024/wporg-developer/.eslintrc.js... Done.Copying .prettierrc.js to /Users/juanmanuelgarrido/PROJECTS/2024/wporg-developer/.prettierrc.js... Done.
Copying .stylelintrc to /Users/juanmanuelgarrido/PROJECTS/2024/wporg-developer/.stylelintrc... Done.
Copying phpcs.xml.dist to /Users/juanmanuelgarrido/PROJECTS/2024/wporg-developer/phpcs.xml.dist... Done.
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:48
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/vendor/symfony/console/Command/DumpCompletionCommand.php:56
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:875
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:880
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Problem.php:366
Your lock file does not contain a compatible set of packages. Please run composer update.Problem 1
- phar-io/manifest is locked to version 1.0.3 and an update of this package was not requested.
- phar-io/manifest 1.0.3 requires php ^5.6 || ^7.0 -> your php version (8.3.0) does not satisfy that requirement.
Problem 2
- phar-io/version is locked to version 2.0.1 and an update of this package was not requested.
- phar-io/version 2.0.1 requires php ^5.6 || ^7.0 -> your php version (8.3.0) does not satisfy that requirement.
Problem 3
- phpspec/prophecy is locked to version v1.10.3 and an update of this package was not requested.
- phpspec/prophecy v1.10.3 requires php ^5.3|^7.0 -> your php version (8.3.0) does not satisfy that requirement.
Problem 4
- phpunit/php-code-coverage is locked to version 6.1.4 and an update of this package was not requested.
- phpunit/php-code-coverage 6.1.4 requires php ^7.1 -> your php version (8.3.0) does not satisfy that requirement.
Problem 5
- phpunit/phpunit is locked to version 7.5.20 and an update of this package was not requested.
- phpunit/phpunit 7.5.20 requires php ^7.1 -> your php version (8.3.0) does not satisfy that requirement.
Problem 6
- sebastian/global-state is locked to version 2.0.0 and an update of this package was not requested.
- sebastian/global-state 2.0.0 requires php ^7.0 -> your php version (8.3.0) does not satisfy that requirement.
Problem 7
- phpunit/phpunit 7.5.20 requires php ^7.1 -> your php version (8.3.0) does not satisfy that requirement.
- yoast/phpunit-polyfills 1.0.3 requires phpunit/phpunit ^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 -> satisfiable by phpunit/phpunit[7.5.20].
- yoast/phpunit-polyfills is locked to version 1.0.3 and an update of this package was not requested.error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
In conversation with @ryelle via Slack she mentioned the required PHP version for this repo is v7.4
Is there any specific PHP version required to run this repo?
yes, 7.4
So, I updated the PHP version on my Mac. For reference, this is how I did it:
-
Tap the
shivammathur/php
repository:-
Tap the
shivammathur/php
repository, which provides PHP versions not available in the default Homebrew formulae (asbrew install php@7.4
returnedWarning: No available formula with the name "php@7.4". Did you mean php@8.2, php@8.1 or php@8.0?
):brew tap shivammathur/php
-
-
Install PHP 7.4:
- Now that you have tapped the repository, you can install PHP 7.4 using the following command:
brew install shivammathur/php/php@7.4
- Now that you have tapped the repository, you can install PHP 7.4 using the following command:
-
Link the v7.4 PHP version, as I had a previous PHP version installed
- So I unlinked the current version:
brew unlink php
- And then, linked PHP 7.4:
brew link php@7.4 --force
- So I unlinked the current version:
-
Configure the Shell - to ensure it's the version the system uses by default, I added the PHP 7.4 binary to my path.
- To do that I added the following line to my shell configuration file (
.zshrc
):export PATH="$(brew --prefix php@7.4)/bin:$PATH"
- After editing the file, apply the changes by running:
source ~/.zshrc
- To do that I added the following line to my shell configuration file (
After these changes I could verify that PHP 7.4 is now the default version on my terminal
php -v