Dealing with unknown option ‘–variant’ when setting up a block environment

  1. From the docs https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/ I would say you have to provide template also for that option, though I never used it.

  2. I recommend you to get yourself more familiar with block development, it is very clear if block is dynamic or static, if it has php callback for rendering instead of save procedure in javascript, it is dynamic. Static blocks are recommended, while dynamic blocks are used where static HTML is not sufficient (i.e. dynamically provide data from database). Even then, it is recommended for the sake of better UI to use React – based block in edit function instead of <ServerSideRender>, which is slow. In reality, many developers choose to develop dynamic blocks because of insufficient knowledge or React and WordPress block development SDK. Famous ACF blocks plugin is based on the same principle.