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:UsersAhmadAppDataRoamingnpmnode_modulescreate-guten-blocknode_modulesexecaindex.js:169:9)
    at C:UsersAhmadAppDataRoamingnpmnode_modulescreate-guten-blocknode_modulesexecaindex.js:274:16
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:UsersAhmadAppDataRoamingnpmnode_modulescreate-guten-blockappnpmInstallScripts.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 theme developer, plugins developer and hosting provider as well. This does not cost you extra, we just get a little commission on your purchase from service provider.