Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Can I use @wordpress/create-block on a Windows machine


Can I use @wordpress/create-block on a Windows machine


you can use the `@wordpress/create-block` tool to create WordPress block plugins on a Windows machine, but there are a few important considerations:

1. Symlinked Directories: The search results indicate that the `@wordpress/create-block` tool will not compile properly if the plugin is created in a symlinked directory on Windows. This seems to be a known issue specific to Windows environments. [2]

2. Node.js and npm: To use `@wordpress/create-block`, you'll need to have Node.js and npm installed on your Windows machine. The search results provide guidance on installing and using Node.js and npm on Windows, including recommendations to use PowerShell and tools like nvm (Node Version Manager) to manage your Node.js installation. [1][3][5]

3. Interactive and Quick Start Modes: The `@wordpress/create-block` tool provides different modes of usage, including an interactive mode that prompts you for inputs step-by-step, and a quick start mode that allows you to pass options directly in the command line. These modes can be helpful when setting up a new block plugin on Windows. [3]

4. Templates: The `@wordpress/create-block` tool also supports the use of templates, which can be useful if you have a preferred block structure or are building multiple blocks with similar configurations. [3]

5. Build and Integration: The search results cover how the `@wordpress/create-block` tool integrates with the `@wordpress/scripts` package to handle the build process and provide common scripts for development, linting, and deployment. This integration should work the same on Windows as on other platforms. [1][3][4]

In summary, while there may be some minor Windows-specific considerations, the `@wordpress/create-block` tool can be used effectively to create WordPress block plugins on a Windows machine by following the guidance provided in the search results.

Citations:
[1] https://learn.wordpress.org/tutorial/using-the-create-block-tool/
[2] https://wordpress.stackexchange.com/questions/411310/error-using-wordpress-create-block-to-create-multiple-blocks-on-windows
[3] https://github.com/WordPress/gutenberg/blob/trunk/docs/getting-started/devenv/get-started-with-create-block.md
[4] https://www.npmjs.com/package/%40wordpress/create-block
[5] https://wpdevelopment.courses/articles/wordpress-create-block/