Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running npm run env:start fails with PHP 7.4 #7516

Closed
westonruter opened this issue Apr 5, 2023 · 1 comment · Fixed by #7517
Closed

Running npm run env:start fails with PHP 7.4 #7516

westonruter opened this issue Apr 5, 2023 · 1 comment · Fixed by #7517
Assignees
Labels
Bug Something isn't working Changelogged Whether the issue/PR has been added to release notes.
Milestone

Comments

@westonruter
Copy link
Member

Bug Description

When running npm run env:start, I'm getting an error:

pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.2.99), installed version is 7.4.33

Full output:

$ npm run env:start

> amp-wp@ env:start /home/westonruter/repos/amp
> wp-env start --xdebug

✖ Error while running docker-compose command.
Step 1/7 : FROM wordpress:php7.4
 ---> d7568c9796d9
Step 2/7 : RUN apt-get -qy install $PHPIZE_DEPS && touch /usr/local/etc/php/php.ini
 ---> Using cache
 ---> 7d1c954c1770
Step 3/7 : RUN if [ -z "$(pecl list | grep xdebug)" ] ; then pecl install xdebug ; fi
 ---> Running in a4171cdf0110
pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.2.99), installed version is 7.4.33
No valid packages found
install failed
Building wordpress
Service 'wordpress' failed to build: The command '/bin/sh -c if [ -z "$(pecl list | grep xdebug)" ] ; then pecl install xdebug ; fi' returned a non-zero code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! amp-wp@ env:start: `wp-env start --xdebug`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the amp-wp@ env:start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/westonruter/.npm/_logs/2023-04-05T20_46_18_749Z-debug.log

Expected Behaviour

Start without error.

We may need to bump the phpVersion to 8.0 in .wp-env.json.

I tried manually making this change, and npm run env:start succeeded.

Screenshots

No response

PHP Version

7.4

Plugin Version

develop

AMP plugin template mode

Standard, Transitional, Reader

WordPress Version

No response

Site Health

No response

Gutenberg Version

No response

OS(s) Affected

No response

Browser(s) Affected

No response

Device(s) Affected

No response

Acceptance Criteria

No response

Implementation Brief

No response

QA Testing Instructions

No response

Demo

No response

Changelog Entry

No response

@westonruter westonruter added the Bug Something isn't working label Apr 5, 2023
@westonruter westonruter added this to the v2.4.2 milestone Apr 5, 2023
@pooja-muchandikar
Copy link

QA Passed ✅

npm run wp-env start command is executing successfully

Screenshot 2023-07-12 at 4 23 13 PM

@thelovekesh thelovekesh added Enhancement New feature or improvement of an existing one P2 Low priority Reader Mode WS:Core Work stream for Plugin core and removed Enhancement New feature or improvement of an existing one P2 Low priority Reader Mode WS:Core Work stream for Plugin core labels Jul 13, 2023
@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Changelogged Whether the issue/PR has been added to release notes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants