The --registry command is passed to spawn with a space, causing the audit to fail with following error:
{ summary: 'Invalid audit subcommand: ` --registry=https://registry.npmjs.org`\n\nUsage:\n\nnpm audit [--json]\nnpm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]', detail: '' } }
The --registry command is passed to spawn with a space, causing the audit to fail with following error:
{ summary: 'Invalid audit subcommand: ` --registry=https://registry.npmjs.org`\n\nUsage:\n\nnpm audit [--json]\nnpm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]', detail: '' } }
Removing the space fixes the issue.