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

@wordpress/env: unable to launch wp-env start #47563

Closed
DaveWP opened this issue Jan 30, 2023 · 3 comments · Fixed by #50004
Closed

@wordpress/env: unable to launch wp-env start #47563

DaveWP opened this issue Jan 30, 2023 · 3 comments · Fixed by #50004
Assignees
Labels
Needs User Documentation Needs new user documentation [Tool] Env /packages/env

Comments

@DaveWP
Copy link

DaveWP commented Jan 30, 2023

Description

I am unable to use the wp_env start command on Windows 11 getting error "Error: spawn git ENOENT"

D:\******>wp-env start
× Error: spawn git ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:19)
    at onErrorNT (internal/child_process.js:472:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
GitError: Error: spawn git ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:19)
    at onErrorNT (internal/child_process.js:472:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
    at Object.action (D:\***\AppData\Roaming\nvm\v14.20.1\node_modules\@wordpress\env\node_modules\simple-git\dist\cjs\index.js:1274:25)
    at PluginStore.exec (D:\***\AppData\Roaming\nvm\v14.20.1\node_modules\@wordpress\env\node_modules\simple-git\dist\cjs\index.js:1309:29)
    at D:\Users\***\Roaming\nvm\v14.20.1\node_modules\@wordpress\env\node_modules\simple-git\dist\cjs\index.js:1674:43
    at new Promise (<anonymous>)
    at GitExecutorChain.handleTaskData (D:\Users\***\Roaming\nvm\v14.20.1\node_modules\@wordpress\env\node_modules\simple-git\dist\cjs\index.js:1672:16)
    at GitExecutorChain.<anonymous> (D:\Users\***\Roaming\nvm\v14.20.1\node_modules\@wordpress\env\node_modules\simple-git\dist\cjs\index.js:1656:44)
    at Generator.next (<anonymous>)
    at fulfilled (D:\Users\***\Roaming\nvm\v14.20.1\node_modules\@wordpress\env\node_modules\simple-git\dist\cjs\index.js:55:24) {
  task: {
    commands: [
      'clone',
      '--depth=1',
      '--no-single-branch',
      'https://github.com/WordPress/WordPress.git',
      'D:\\Users\\***\\wp_env\\3cf2e462d9e94317b3b37989b53578b2\\WordPress'
    ],
    format: 'utf-8',
    parser: [Function: parser]
  }
}

Step-by-step reproduction instructions

Running Windows Home edition with latest updates applied

  1. Install Docker on Windows 11
  2. Install Windows Subsystem for Linux
  3. Start Docker
  4. Run 'npm -g i @wordpress/env'
  5. Enter 'wp_env start'
  6. The command starts downloading the wordpress images and then crashes.

Screenshots, screen recording, code snippet

I have been able to get Docker running image 1c8083a908639a4921369a6a54d72e8667d54999ab9f20eeda9a0e6d42ee1796 but it appears to be an uninitialised wordpress installation. It is not clear which Docker image I should be using as the documentation merely states:

_Finally, navigate to http://localhost:8888 in your web browser to see WordPress running with the local WordPress plugin or theme running and activated. Default login credentials are username: admin password: password._

Environment info

Windows 11 Home edition

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

@talldan talldan added Needs Testing Needs further testing to be confirmed. [Tool] Env /packages/env labels Jan 31, 2023
@Mamaduka
Copy link
Member

Hi, @DaveWP

Can you confirm that you've git installed and available in a shell? You can do this by running the following command git --version

Thank you!

@Mamaduka Mamaduka added the [Status] Needs More Info Follow-up required in order to be actionable. label Jan 31, 2023
@DaveWP
Copy link
Author

DaveWP commented Feb 2, 2023

I have been able to solve the problem, by:

  1. Installing Windows Subsystem for Linux (via the Windows Store)
  2. Installing Git for Windows (website download)
  3. Removing Docker
  4. Installing Docker with Administration rights

Perhaps the documentation could be updated on the wordpress developers website to cover the requirements for git and WSL, as well as installing Docker with admin rights.

@Mamaduka
Copy link
Member

Mamaduka commented Feb 2, 2023

Thanks for the update, @DaveWP!

@Mamaduka Mamaduka added Needs User Documentation Needs new user documentation and removed [Status] Needs More Info Follow-up required in order to be actionable. Needs Testing Needs further testing to be confirmed. labels Feb 2, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Apr 21, 2023
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs User Documentation Needs new user documentation [Tool] Env /packages/env
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants