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

Gutenberg Plugin: npm run start | buildcommand does not generate PHP files related to blocks on Windows OS #65244

Closed
2 tasks done
t-hamano opened this issue Sep 11, 2024 · 0 comments · Fixed by #65248
Closed
2 tasks done
Assignees
Labels
OS Issues Issues or PRs that are related to OS specific problems [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Sep 11, 2024

Description

Discovered this while testing #65064

When I run the npm run start or npm run build command, PHP files for server-side rendering of blocks are created in the build/block-library/blocks/ directory.

This works correctly on a Linux OS, but if I run this command on a Windows host OS, these PHP files are not generated.

Build on WSL2 (Ubuntu) Build on Windows Host OS
wsl windows-host

This makes it difficult to build a Gutenberg project on a Windows host OS and test dynamic blocks on the frontend.

I took a difference between the logs when running npm run build on Ubuntu OS and Windows host OS, and it certainly looks like the PHP files are not being built:

diff

After investigating the issue with git bisect, I found that this problem occurred in #63311.

When building a block using the latest @wordpress/scripts package, the PHP files defined in the render field and variations field are copied correctly.

Therefore, the changes made in this file, which is a custom setting for the Gutenberg project, may be the cause.

Step-by-step reproduction instructions

  • Run npm run start or npm run build on the Windows host OS.
  • Check the build/block-library/blocks/ directory.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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
@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling OS Issues Issues or PRs that are related to OS specific problems labels Sep 11, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 11, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS Issues Issues or PRs that are related to OS specific problems [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
1 participant