@wordpress/create-block ‘wp-scripts’ is not recognized as a command

I am trying to create a standard WordPress gutenberg block but I can’t get paste the first step. I have cleared my npm cache but still getting the same error: ‘wp-scripts’ is not recognized as an internal or external command, operable program or batch file.

The node_modules folder is being created with all the dependencies of wp-scripts, but all the folders are empty? Very strange and I am not sure what I have to do here.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>PS C:UsersMyPath> npx @wordpress/create-block@latest
Let's customize your WordPress plugin with blocks:
? The template variant to use for this block: dynamic
? The block slug used for identification (also the output folder name): myblocks
? The internal namespace for the block name (something unique for your products): myblocks
? The display title for your block: My Blocks
? The short description for your block (optional): Example block scaffolded with Create Block tool.
? The dashicon to make it easier to identify your block (optional): smiley
? The category name to help users browse and discover your block: theme
? Do you want to customize the WordPress plugin? No
Creating a new WordPress plugin in the myblocks directory.
Creating a "block.json" file.
Creating a "package.json" file.
Installing `@wordpress/scripts` package. It might take a couple of minutes...
Formatting JavaScript files.
C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaliberror.js:59
error = new Error(message);
^
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.
> [email protected] format
> wp-scripts format
at makeError (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaliberror.js:59:11)
at handlePromise (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaindex.js:114:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async module.exports (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibinit-wp-scripts.js:25:2)
at async module.exports (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibscaffold.js:156:4)
at async Command.<anonymous> (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibindex.js:194:6) {
shortMessage: 'Command failed with exit code 1: npm run format',
command: 'npm run format',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: 'n> [email protected] formatn> wp-scripts formatn',
stderr: "'wp-scripts' is not recognized as an internal or external command,rn" +
'operable program or batch file.',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Node.js v20.15.0
</code>
<code>PS C:UsersMyPath> npx @wordpress/create-block@latest Let's customize your WordPress plugin with blocks: ? The template variant to use for this block: dynamic ? The block slug used for identification (also the output folder name): myblocks ? The internal namespace for the block name (something unique for your products): myblocks ? The display title for your block: My Blocks ? The short description for your block (optional): Example block scaffolded with Create Block tool. ? The dashicon to make it easier to identify your block (optional): smiley ? The category name to help users browse and discover your block: theme ? Do you want to customize the WordPress plugin? No Creating a new WordPress plugin in the myblocks directory. Creating a "block.json" file. Creating a "package.json" file. Installing `@wordpress/scripts` package. It might take a couple of minutes... Formatting JavaScript files. C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaliberror.js:59 error = new Error(message); ^ 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. > [email protected] format > wp-scripts format at makeError (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaliberror.js:59:11) at handlePromise (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaindex.js:114:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async module.exports (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibinit-wp-scripts.js:25:2) at async module.exports (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibscaffold.js:156:4) at async Command.<anonymous> (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibindex.js:194:6) { shortMessage: 'Command failed with exit code 1: npm run format', command: 'npm run format', exitCode: 1, signal: undefined, signalDescription: undefined, stdout: 'n> [email protected] formatn> wp-scripts formatn', stderr: "'wp-scripts' is not recognized as an internal or external command,rn" + 'operable program or batch file.', failed: true, timedOut: false, isCanceled: false, killed: false } Node.js v20.15.0 </code>
PS C:UsersMyPath> npx @wordpress/create-block@latest

Let's customize your WordPress plugin with blocks:
? The template variant to use for this block: dynamic
? The block slug used for identification (also the output folder name): myblocks
? The internal namespace for the block name (something unique for your products): myblocks
? The display title for your block: My Blocks
? The short description for your block (optional): Example block scaffolded with Create Block tool.
? The dashicon to make it easier to identify your block (optional): smiley
? The category name to help users browse and discover your block: theme
? Do you want to customize the WordPress plugin? No

Creating a new WordPress plugin in the myblocks directory.

Creating a "block.json" file.

Creating a "package.json" file.

Installing `@wordpress/scripts` package. It might take a couple of minutes...

Formatting JavaScript files.
C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaliberror.js:59
                error = new Error(message);
                        ^

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.

> [email protected] format
> wp-scripts format

    at makeError (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaliberror.js:59:11)
    at handlePromise (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modulesexecaindex.js:114:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async module.exports (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibinit-wp-scripts.js:25:2)
    at async module.exports (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibscaffold.js:156:4)
    at async Command.<anonymous> (C:UsersUserAppDataLocalnpm-cache_npx9444c7de6ab42aaenode_modules@wordpresscreate-blocklibindex.js:194:6) {
  shortMessage: 'Command failed with exit code 1: npm run format',
  command: 'npm run format',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: 'n> [email protected] formatn> wp-scripts formatn',
  stderr: "'wp-scripts' is not recognized as an internal or external command,rn" +
    'operable program or batch file.',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v20.15.0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật