'wp-scripts' error when using site shell

What issue or error are you experiencing?

I’m following the guide to create a block (Scaffold your first block | Learn WordPress).

I’ve done it previously with no issues but now I’m getting

Error: Command failed with exit code 1: npm run format
'wp-scripts' is not recognized as an internal or external command,
operable program or batch file.

This is in the site shell, and I’m a front end dev so I’m a bit out of my depth :sweat_smile:
My impression was that this was a sort of VM with all this stuff ready to go?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

  • create new site using local
  • start site and open site shell
  • cd to plugins folder
  • run npx @wordpress/create-block block-name

System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @JakePowell

I just tested this in my app but didn’t get any error.

Could you provide some more details to help us take a further look?

  • What is your OS?

  • What version of Local are you on?

  • Please attach a copy of your Local Logs

Keep us posted and we’d be happy to help further!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.