• Hello! I want to create a block using the below

    npx @wordpress/create-block custom-block --variant dynamic

    but the terminal says
    "Error: unknown option '--variant'". option '--variant'".

    I’ve also tried this:

    npx @wordpress/create-block custom-block --variant=dynamic

    this didn’t work either.
    Do you know how to solve this problem? Thank you ??

    • This topic was modified 2 years, 3 months ago by mihopress.
    • This topic was modified 2 years, 3 months ago by mihopress.
    • This topic was modified 2 years, 3 months ago by mihopress.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi,

    What is your working environment? Windows, Mac, Linux? I tried on my Linux machine and it initially prompted me to install the @wordpress/[email protected] package.

    What version of Node was this on?

    I’m facing the same exact issue.
    I’m on windows 10 with npm version 8.1.1, and node version 16.13.0

    If the –variant is no longer an option for creating blocks, how do we insure that we are creating a dynamic block, vs a static block?

    Deleting the npx cache worked for me (mac):

    rm -r ~/.npm/_npx/

    Then just rerun:

    npx @wordpress/create-block --variant dynamic

    • This reply was modified 2 years, 1 month ago by Sunny.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Regarding create-block for dynamic block’ is closed to new replies.