npx @wordpress/create-block throws an error “Command failed with exit code 1: npm install @wordpress/scripts –save-dev” Gutenberg custom block plugin

Solution:

Can you try npm install @wordpress/scripts –save-dev –legacy-peer-deps

This solved it for me.