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

wp-env causes segmentation fault on Ubuntu 20.04 #22731

Closed
sainthkh opened this issue May 29, 2020 · 5 comments
Closed

wp-env causes segmentation fault on Ubuntu 20.04 #22731

sainthkh opened this issue May 29, 2020 · 5 comments
Labels
[Tool] Env /packages/env [Type] Bug An existing feature does not function as intended

Comments

@sainthkh
Copy link
Contributor

Describe the bug

When you run npx wp-env start, you got the message,

npx wp-env start
✖ Error while running docker-compose command.
Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable

When you run sudo npx wp-env start, you got the message,

sudo npx wp-env start
The module '/home/sainthkh/v/gutenberg/node_modules/nodegit/build/Release/nodegit.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Segmentation fault

To reproduce
Steps to reproduce the behavior:

  1. Clone repo and install dependencies with npm i.
  2. npx wp-env start or sudo npx wp-env start.

It might not be reproducible because it's related with nodejs version and compiling system.

Expected behavior

wp-env executes correctly.

Screenshots

N/A

Editor version (please complete the following information):

  • WordPress version: N/A
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? N/A
  • If the Gutenberg plugin is installed, which version is it? 8.2.1

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser N/A

Smartphone (please complete the following information):

N/A

@ZebulanStanphill ZebulanStanphill added [Type] Bug An existing feature does not function as intended [Tool] Env /packages/env labels May 29, 2020
@noahtallen
Copy link
Member

🤔

Please try re-compiling or re-installing the module

Out of curiosity, did you try updating npm and doing the re-compile step?

Couldn't connect to Docker daemon

A quick google seemed to indicate this is a really common problem when running Docker in Linux environments. Do you think there is anything we can do to mitigate it on our side of things? It sounds like fixing it would have to do with the local docker engine install. We could add docs to talk about how to fix it if you find a solution (https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo)

@timnolte
Copy link
Contributor

timnolte commented Sep 9, 2020

@sainthkh I'm running things just fine, on Ubuntu 20.04 with NVM, when I add wp-env to my project's package.json, scripts section. I haven't attempted the use of NPX. What version of Node & NPM are you using with your setup? I've tested this is working with both v10 & v12 of Node.

@noahtallen
Copy link
Member

I'll also add that I have also been able to run wp-env fine on PopOS, which is based on Ubuntu.

@sainthkh
Copy link
Contributor Author

Following the setting from #25060, it works. Close this issue.

@ZebulanStanphill
Copy link
Member

I'd like to note that I recently setup a new laptop running KDE Neon (which is based on Ubuntu), and following the steps detailed in the latest version of the docs worked for me: wp-env seems to be working perfectly there.

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

No branches or pull requests

4 participants