Skip to content

Conversation

@jonathanbossenger
Copy link
Collaborator

@jonathanbossenger jonathanbossenger commented Jun 14, 2025

Closes #3188

Needs testing

  • macOS
  • Windows
  • Linux (Ubuntu)

Testing instructions:

  1. Clone this repository (if you haven't already): git clone https://github.com/WordPress/Learn.git
  2. Check out the cross-env branch: git checkout cross-env
  3. Follow the setup instructions in the readme. The local environment should be successfully set up

@timboomerang
Copy link

Hello,
On Windows, I still have this issue.

PS C:\www\learn-wp> yarn run create
yarn run v1.22.22
$ composer install && yarn setup:tools && yarn build && yarn run install:env
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
5 packages you are using are looking for funding.
Use the composer fund command to find out more!
$ cross-env TEXTDOMAIN=wporg-learn composer exec update-configs
<3>WSL (397 - Relay) ERROR: CreateProcessCommon:725: execvpe(/bin/bash) failed: No such file or directory
Script update-configs handling the __exec_command event returned with error code 1
error Command failed with exit code 1.

Docker is running, but no particular image has been installed so far.

@jonathanbossenger
Copy link
Collaborator Author

@timboomerang thanks for the feedback, I still need to test it on Windows myself.

@rjekic
Copy link

rjekic commented Jul 12, 2025

@jonathanbossenger @timboomerang

I've tested the setup on all three operating system environments, and I can confirm that it is working.

But, in order to run it on Windows, we must make some minor modifications and install additional apps (if they are not preinstalled).

Steps for installing on Windows:

  • Using chocolately, install zip and unzip (if they don't already exist on the system)
    chocolately install zip
    chocolately install uzip
  • also, install cross-env npm package if not installed using npm install -g cross-env
  • important note: to be able to run all shell scripts during the install phase, you must use the git-bash, not other terminals like WSL, PowerShell, CMD. The file path is different in Windows and Unix-like systems (slash and backslash difference).
  • update line 27 in file package.json to this - "install:env": "bash ./bin/index.sh",.
    If you don't add bash as the command interpreter, the index.sh script will not be executed, and we will get a blank WordPress instance.
  • line 33 stays as @jonathanbossenger suggested - "setup:tools": "cross-env TEXTDOMAIN=wporg-learn composer exec update-configs",

Once you've made these modifications, follow the setup instructions to ensure everything starts correctly.

@jonathanbossenger
Copy link
Collaborator Author

Thank you for helping to test @rjekic. I just haven't had time. I'm going to be AFK next week, but I'll take a look as soon as I get back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting the TEXTDOMAIN local variable during the setup:tools step fails on Windows

3 participants