‘wp-scripts’ error when using site shell FOLLOWUP

What issue or error are you experiencing?

new clean WP install and then use Shell to create a custom block in PLUGINS using command “npx @wordpress/create-block” command will fail out of the box

Posting the solution because it is difficult to find/track down - plus previous topic posted above was never resolved (or allowed to add solution after closed)

export NODE_ENV=development

the solution was to run export NODE_ENV=development first. If the NODE_ENV isn’t development, the npm install command doesn’t install the development dependency @wordpress/scripts. cc [@talldan]

LINK:(`npx @wordpress/create-block` fails with "Error: Command failed with exit code 127" · Issue #28809 · WordPress/gutenberg · GitHub)

System Details

  • Local Version:
    Version 9.0.1+6673
  • Operating System (OS) and OS version:
    Mac OS 14.4.1 (23E224)

1 Like

Thank you for sharing @gman! :green_heart: