-
Notifications
You must be signed in to change notification settings - Fork 42
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
Can't start wp-now on Windows OS because of file path fatal #11
Comments
@t-hamano You'll need Node.js 18+, the error message isn't very clear about that unfortunately – I'd love to clarify it. |
@adamziel I was able to move beyond the error in Windows OS by changing the Node version to 18, but another error occurred. Error Log
The mount path (
I still don't understand the project, but if I have time I will try to find the cause. |
Can confirm I'm getting the exact same error, using node v18.16.0, will report back if I can get past it. |
Interesting! Thank you so much for surfacing this issue @t-hamano and helping to triage @jason3by2! This helps with making it work for all the Windows users out there. Solutions-wise, I wonder if this path is even visible/accessible from Node.js. Could it be a permissions issue? Could that be an issue with mixing |
The URI with the
The location indicated by this error is this line: Perhaps |
I am getting the same error. |
@t-hamano @richard-bonk-bf @narinder9 I'm unable to reproduce because I don't have a Windows machine, unfortunately. My guess is that it's a path issue. To start on the debugging journey, can you install from Git clone and see if the issue reproduces with |
Unfortunately, because that script contains UNIX commands, it cannot be debugged on the Windows host OS. The results of the 6eae1c565760fd778d2d5b898b0bab0c.mp4If on WSL, that command will work fine, but will instead cause the problems mentioned in this comment. Also, this problem would need to be verified on a Windows host OS, not a WSL. This is why I submitted WordPress/wordpress-playground#435 😅 |
@t-hamano I guess this shows how thoroughly we tested on Windows 😅 All of this makes sense, thanks! I guess we'll need to figure out a solution for WordPress/wordpress-playground#435 first. |
I reproduced that issue on Windows 11 with PowerShell:
Then I tried running the development version of the |
playground-tools/packages/wp-now/src/wp-now.ts Lines 321 to 326 in 4a0ea12
The first The second So – we can’t use path.join for VFS paths because it uses the Windows-style slashes on Windows. |
…71) ## Description Solves #11 `wp-now` mounts mu-plugins like this: ```ts php.mount( path.join(getWpNowPath(), 'mu-plugins'), path.join(vfsDocumentRoot, 'wp-content', 'mu-plugins') ); ``` The first path is the local HOST path, the second path is a VFS path. On Mac and linux, they both use forward slashes. On Windows, the first path can use backslashes, but the VFS path still needs to use forward slashes. Problem is: `path.join()` transforms all slashes to backslashes on Windows, which makes the second path invalid like `\\var\\www\\html`. This commit corrects that. ## Testing Instructions Confirm wp-now and the VS code extension can both be started on Windows. Confirm they didn't break on Mac or linux. --------- Co-authored-by: sejas <antonio@sejas.es>
I reinstalled the latest wp-now including #71 on my Windows host OS. I was able to boot successfully and would like to close this issue. Thank you so much! |
Thanks for your help tracking it down, @t-hamano ! |
Heyas, just wanted to pop back in here to confirm that the latest version also runs successfully for me on win10. |
I have tried wp-now on both Windows host OS and WSL2 and could not start it. Ths may be a problem with my environment, is there anything I should try?
Commands executed
Occurred Error
Environment
Note: Both environments use Volta as their version control tool.
Windows Host
WSL2
The text was updated successfully, but these errors were encountered: