ENV
➜ ~ node -v
v18.0.0
➜ ~ npm -v
8.6.0
➜ ~ which node
/Users/xxxxx/Library/Application Support/fnm/node-versions/v18.0.0/installation/bin/node
Error
Error: Command failed: tar xzf /Users/xxx/Library/Application Support/fnm/node-versions/v18.0.0/installation/lib/node_modules/@openkraken/cli/kraken-darwin-0.10.5.tar.gz -C ./build
Reason
In my case, the file directory contains spaces. And you can't execute that command with space.
The code is in https://github.com/openkraken/cli/blob/master/install.js#L15
execSync(`tar xzf ${path.join(__dirname, tarName)} -C ./build`, processOptions);
Suggest to fix
execSync(`tar xzf ${path.join(__dirname, tarName).replace(/ /g, "\\ ")} -C ./build`, processOptions);