When one attempts to sync local blocks to WordPress using the cli command faust blockset from @faustwp/cli package we get a dependency issue with the fetchBlockFiles() step.
Steps to reproduce
Clone @faustwp/block-support-example
Execute blockset script from package.json
Additional context
Error output
"faust blockset" failed with the following error: TypeError: glob is not a function at /Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/glob-promise@6.0.7_glob@10.4.5/node_modules/glob-promise/lib/index.js:5:5 at new Promise (<anonymous>) at promise (/Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/glob-promise@6.0.7_glob@10.4.5/node_modules/glob-promise/lib/index.js:4:10) at fetchBlockFiles (file:///Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/@faustwp+cli@3.1.0_encoding@0.1.13_webpack-dev-server@4.15.2_webpack-cli@5.1.4_webpack@5.95.0__webpack@5.95.0/node_modules/@faustwp/cli/dist/blockset.js:59:12) at blockset (file:///Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/@faustwp+cli@3.1.0_encoding@0.1.13_webpack-dev-server@4.15.2_webpack-cli@5.1.4_webpack@5.95.0__webpack@5.95.0/node_modules/@faustwp/cli/dist/blockset.js:198:29) at async file:///Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/@faustwp+cli@3.1.0_encoding@0.1.13_webpack-dev-server@4.15.2_webpack-cli@5.1.4_webpack@5.95.0__webpack@5.95.0/node_modules/@faustwp/cli/dist/index.js:56:13
The recommended fix is to use the glob package directly for Promise support instead of the glob-promise wrapper.
[!IMPORTANT]
Glob has native Promise support as of v9.0.0, please use it directly. I will not issue a deprecation notice on this package, because I can't deal with the volume of angry tickets that will follow.
@faustwp/core Version
3.1.0
@faustwp/cli Version
3.1.0
FaustWP Plugin Version
latest
WordPress Version
latest
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
Description
When one attempts to sync local blocks to WordPress using the cli command
faust blockset
from @faustwp/cli package we get a dependency issue with the fetchBlockFiles() step.Steps to reproduce
blockset
script from package.jsonAdditional context
Error output
"faust blockset" failed with the following error: TypeError: glob is not a function at /Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/glob-promise@6.0.7_glob@10.4.5/node_modules/glob-promise/lib/index.js:5:5 at new Promise (<anonymous>) at promise (/Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/glob-promise@6.0.7_glob@10.4.5/node_modules/glob-promise/lib/index.js:4:10) at fetchBlockFiles (file:///Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/@faustwp+cli@3.1.0_encoding@0.1.13_webpack-dev-server@4.15.2_webpack-cli@5.1.4_webpack@5.95.0__webpack@5.95.0/node_modules/@faustwp/cli/dist/blockset.js:59:12) at blockset (file:///Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/@faustwp+cli@3.1.0_encoding@0.1.13_webpack-dev-server@4.15.2_webpack-cli@5.1.4_webpack@5.95.0__webpack@5.95.0/node_modules/@faustwp/cli/dist/blockset.js:198:29) at async file:///Users/davalon/Projects/eni-nextjs-builder/node_modules/.pnpm/@faustwp+cli@3.1.0_encoding@0.1.13_webpack-dev-server@4.15.2_webpack-cli@5.1.4_webpack@5.95.0__webpack@5.95.0/node_modules/@faustwp/cli/dist/index.js:56:13
The recommended fix is to use the
glob
package directly for Promise support instead of theglob-promise
wrapper.[!IMPORTANT] Glob has native Promise support as of v9.0.0, please use it directly. I will not issue a deprecation notice on this package, because I can't deal with the volume of angry tickets that will follow.
@faustwp/core Version
3.1.0
@faustwp/cli Version
3.1.0
FaustWP Plugin Version
latest
WordPress Version
latest
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.