-
Notifications
You must be signed in to change notification settings - Fork 269
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
Compatibility with Windows and WSL #435
Comments
@t-hamano have you tried using the Windows Subsystem for Linux? |
@dmsnell
Yes, I am developing on WSL2 primarily for the Gutenberg Project. However, I could not build the project even on WSL. The following error occurs (However, this might be a problem in my environment):
I also believe that debugging on Windows OS is necessary to resolve Windows-specific issues such as those reported in WordPress/playground-tools#11. |
@t-hamano was just discussing this in another issue. workaround for now to confirm the problem is |
It would be great not to rely on the global About |
@dmsnell The |
CCing @danielbachhuber about the connection error. @t-hamano WSL should just allow you to use any ports, right? I just wanted to confirm you don't have to explicitly allow network traffic. |
According to this comment from the WSL project, my understanding is as follows:
However, Therefore, one solution might be to change the address that wp-now listens on to |
@t-hamano Want to submit a PR with your suggested changes? |
Yes, I still lack understanding about this project, but I will try to submit a PR soon. |
I'm not sure if it's related, but there was an issue with using Just wanted to mention it, in case you see the same error. |
@t-hamano I believe it's hardcoded in this line:
@eliot-akira good point! Perhaps it would work now that |
See [this comment](#435 (comment)). ## What? This PR changes the URL that `wp-now` listens on from `127.0.0.1` to localhost. ## Why? When I run `wp-now start` in WSL (a Windows virtual environment), it listens on `127.0.0.1` (ipv4 address). However, when I access the URL on the host OS, it resolves `to::1` (ipv6 address), so I believe this is why the server is unreachable. ## Testing Instructions - run `nx preview wp-now start` - Confirm that the console displays the expected logs: `Server running at http://localhost:8881/` - Confirm that the WordPress site is displayed when accessing `http://localhost:8881/`. - Conform that WordPress Address and Site Address settings are `http://localhost:8881/`. - Confirm that all resources such as CSS and JS are also loaded at this URL and that no errors are output to the console.
Another contributor hitting the original report WordPress/playground-tools#66 |
See [this comment](WordPress/wordpress-playground#435 (comment)). ## What? This PR changes the URL that `wp-now` listens on from `127.0.0.1` to localhost. ## Why? When I run `wp-now start` in WSL (a Windows virtual environment), it listens on `127.0.0.1` (ipv4 address). However, when I access the URL on the host OS, it resolves `to::1` (ipv6 address), so I believe this is why the server is unreachable. ## Testing Instructions - run `nx preview wp-now start` - Confirm that the console displays the expected logs: `Server running at http://localhost:8881/` - Confirm that the WordPress site is displayed when accessing `http://localhost:8881/`. - Conform that WordPress Address and Site Address settings are `http://localhost:8881/`. - Confirm that all resources such as CSS and JS are also loaded at this URL and that no errors are output to the console.
is this still relevant? url is no longer hardcoded |
@ajitbohra The URL issue should now be solved, but the larger question about Windows compatibility still stands. Perhaps requiring WSL as a dependency would be a good middle-ground. @t-hamano – is everything working for you on WSL now? |
I've been away from this project for a while, so could you please tell me what I should check? For the time being, when I executed 6af728706e50045e825cc64bf9668339.mp4 |
Thank you for testing @t-hamano! That's useful for the core Wordpress Playground repo. I was about to ask if you could also try So yes, this issue still stands. |
Regarding wp-now, it seems to be working mostly fine, both in the case of developing the playground-tools project itself and using the library. The command that is failing may be a problem with my environment or testing procedure 🤔 playground-tools project developmentAfter cloning the
wp-now package
Is there anything else I should check? |
I want to contribute to this project and attempted to build the project. I am using Windows OS and could not build it because of the UNIX-derived commands used.
For example, the
cp
command is not recognized as follows (the equivalent command iscopy
on Windows) :So, after a quick look at the commands property of
project.json
, it seems that the following commands are not available on Windows:rm
zip
cp
cat
The three solutions I know of are as follows:
cpx
,rimraf
, etc.I know it is very difficult to build an OS-independent development environment for such an advanced project, but I would be happy to help in any way I can.
The text was updated successfully, but these errors were encountered: