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

New installations of @wordpress/env installs docker-compose 0.24.4 and throws an error on usage #59183

Open
angcl opened this issue Feb 19, 2024 · 3 comments · May be fixed by #59184
Open

New installations of @wordpress/env installs docker-compose 0.24.4 and throws an error on usage #59183

angcl opened this issue Feb 19, 2024 · 3 comments · May be fixed by #59184
Labels
[Package] Env /packages/env [Type] Bug An existing feature does not function as intended

Comments

@angcl
Copy link

angcl commented Feb 19, 2024

Description

When installing the @wordpress/env package, it installs the new version of the [docker-compose|https://www.npmjs.com/package/docker-compose] dependency (0.24.4), which results in an error that says dockerCompose.down is not a function. It works flawlessly with the version 0.24.3.

Step-by-step reproduction instructions

  • Create a new folder
  • Initialize npm npm init -y
  • Install wp-env npm install @wordpress/env --save-dev
  • Run npx wp-env start

Screenshots, screen recording, code snippet

❯ mkdir new-project
❯ cd new-project
❯ npm init -y
❯ npm install @wordpress/env --save-dev
❯ npx wp-env start
✖ dockerCompose.down is not a function
TypeError: dockerCompose.down is not a function
    at stop (/Users/.../node_modules/@wordpress/env/lib/commands/stop.js:27:22)
    at async start (/Users/.../node_modules/@wordpress/env/lib/commands/start.js:111:3)

Environment info

macOS 14.2.1
Node.js v18.19.1

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

@angcl angcl added the [Type] Bug An existing feature does not function as intended label Feb 19, 2024
@angcl
Copy link
Author

angcl commented Feb 19, 2024

For me, it worked to use the prior version 0.24.3 of docker-compose in the package.json.

    "devDependencies": {
        ...
        "@wordpress/env": "^9.3.0",
        "docker-compose": "0.24.3",
        ...
    },

@peperuda
Copy link

peperuda commented Feb 19, 2024

The problem is that in the destroy.js and in the stop.js the function compose.down is used, but this function was renamed with docker-compose v0.24.4 to compose.downAll .

@angcl
Copy link
Author

angcl commented Feb 20, 2024

Should work with the new version (0.24.6) of docker-compose out-of-the-box.
PDMLab/docker-compose#264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Env /packages/env [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants