[wp-trac] [WordPress Trac] #64559: Build: copyBlockAssets fails when core block types directories contain subdirectories
WordPress Trac
noreply at wordpress.org
Tue Jan 27 21:55:45 UTC 2026
#64559: Build: copyBlockAssets fails when core block types directories contain
subdirectories
--------------------------+------------------------------
Reporter: mcsf | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Description changed by mcsf:
Old description:
> Issue first described at
> https://github.com/WordPress/gutenberg/pull/74805#issuecomment-3800272544
>
> **Steps to reproduce:**
>
> - In `package.json`, change `.gutenberg.ref` to a recent Gutenberg hash
> (e.g. `2654e7d13086e483855cedf089ba6f4e86c967d7`)
> - Run `npm run build:dev`
> - See the "Copying blocks..." step fail as it tries to copy a directory
> using `fs.copySync`:
>
> {{{
> Unexpected error: Error: ENOTSUP: operation not supported on socket,
> copyfile 'wordpress-develop/gutenberg/build/scripts/block-library
> /navigation-link/shared' -> 'wordpress-develop/src/wp-includes/blocks
> /navigation-link/shared'
> at Object.copyFileSync (node:fs:3085:11)
> at copyBlockAssets (wordpress-develop/tools/gutenberg/copy-gutenberg-
> build.js:231:9)
> }}}
>
> **Fix:**
>
> Let `fs.cpSync` handle the entire recursive copy.
New description:
Issue first described at
https://github.com/WordPress/gutenberg/pull/74805#issuecomment-3800272544
Follow-up of #64393
**Steps to reproduce:**
- In `package.json`, change `.gutenberg.ref` to a recent Gutenberg hash
(e.g. `2654e7d13086e483855cedf089ba6f4e86c967d7`)
- Run `npm run build:dev`
- See the "Copying blocks..." step fail as it tries to copy a directory
using `fs.copySync`:
{{{
Unexpected error: Error: ENOTSUP: operation not supported on socket,
copyfile 'wordpress-develop/gutenberg/build/scripts/block-library
/navigation-link/shared' -> 'wordpress-develop/src/wp-includes/blocks
/navigation-link/shared'
at Object.copyFileSync (node:fs:3085:11)
at copyBlockAssets (wordpress-develop/tools/gutenberg/copy-gutenberg-
build.js:231:9)
}}}
**Fix:**
Let `fs.cpSync` handle the entire recursive copy.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64559#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list