Skip to content

Build error when no markup.php files #277

@johnwatkins0

Description

@johnwatkins0

Describe the bug

  1. When running 10up-toolkit build
  2. If I have no files that match the glob /path/to/my/site/wp-content/themes/my-theme/includes/blocks/**/markup.php
  3. I get the following error:
ERROR in unable to locate '/path/to/my/site/wp-content/themes/my-theme/includes/blocks/**/markup.php' glob

webpack 5.75.0 compiled with 1 error in 3018 ms
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @my-theme/theme@1.0.0
  1. And pipelines, builds, etc. can't proceed

Temporary workaround: create a markup.php file in any includes/blocks subdirectory in the theme, even if it's unused.

Steps to Reproduce

  1. Create a site using 10up scaffold and using 10up-toolkit to build
  2. Remove any markup.php files in the includes/blocks subdirectories.
  3. Run npm run build in the theme.
  4. See the rerror

Screenshots, screen recording, code snippet

Possibly related to:

Environment information

No response

WordPress information

Latest 10up scaffold using latest 10up-toolkit

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions