• Home
  • Tutorial

Error: Command failed: npm install cgb-scripts –save –save-exact –silent

I used below command to create a gutenberg block in my plugins directory. 

npx create-guten-block my-block

But this brings an error like below.

Error: Command failed: npm install cgb-scripts --save --save-exact --silent

    at makeError (C:\Users\Ahmad\AppData\Roaming\npm\node_modules\create-guten-block\node_modules\execa\index.js:169:9)
    at C:\Users\Ahmad\AppData\Roaming\npm\node_modules\create-guten-block\node_modules\execa\index.js:274:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:\Users\Ahmad\AppData\Roaming\npm\node_modules\create-guten-block\app\npmInstallScripts.js:48:3 {
  code: 1,
  stdout: '',
  stderr: '',
  failed: true,
  signal: null,
  cmd: 'npm install cgb-scripts --save --save-exact --silent',
  timedOut: false,
  killed: false

Node.js v18.12.1


If you are facing same issue, you can use below command to fix the issue.

					npx @wordpress/create-block todo-list
For more details follow below resources.
Gutenberg Documentation
Disclosure: We are affiliated with several hosting provider, WordPress Theme Developer & plugins developers. We may earn commission if you choose to purchase mentioned product at no extra cost to you!.