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

Can't build wp-now on windows as cp doesn't work #66

Open
wojtekn opened this issue Jun 5, 2023 · 2 comments
Open

Can't build wp-now on windows as cp doesn't work #66

wojtekn opened this issue Jun 5, 2023 · 2 comments
Labels
Bug Something isn't working wp-now

Comments

@wojtekn
Copy link
Collaborator

wojtekn commented Jun 5, 2023

I tried building wp-now on a Windows 11 Powershell, but it failed with the error:

PS C:\Users\wojtek\playground-tools> npm run build

> wp-playground@0.0.0 build
> nx run-many --all --target=build

    ×  nx run wp-now:build:bundle
       'cp' is not recognized as an internal or external command,
       operable program or batch file.
       Warning: run-commands command "cp packages/wp-now/public/* dist/packages/wp-now" exited with non-zero status code
    ×  nx run vscode-extension:build:bundle
       'cp' is not recognized as an internal or external command,
       operable program or batch file.
       Warning: run-commands command "cp -r packages/vscode-extension/public dist/packages/vscode-extension" exited with non-zero status code
    √  nx run nx-extensions:build (5s)
    √  nx run interactive-code-block:build:bundle (30s)

    ×  nx run interactive-code-block:build:zip

Copy commands like cp packages/wp-now/public/* dist/packages/wp-now work fine when I use them directly in the shell.

I ran those two copy commands manually and tried to run wp-now, but it tried running build so it failed too:

PS C:\Users\wojtek\playground-tools>  nx preview wp-now start --path=../wordpress-seo

> nx run wp-now:"build:bundle"

'cp' is not recognized as an internal or external command,
operable program or batch file.
Warning: run-commands command "cp packages/wp-now/public/* dist/packages/wp-now" exited with non-zero status code

@wojtekn
Copy link
Collaborator Author

wojtekn commented Jun 5, 2023

I don't know what is the best fix, but the one proposed here looks solid.

@danielbachhuber
Copy link
Member

Related WordPress/wordpress-playground#435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working wp-now
Projects
None yet
Development

No branches or pull requests

2 participants