When using this with Composer 2, npm install fails due to the version of the PHP CodeSniffer Standards Composer Installer plugin.
If I manually change the version number of dealerdirect/phpcodesniffer-composer-installer in composer.json from "^0.5.0"to "^0.7.0" everything works perfectly.
More details at this comment: PHPCSStandards/composer-installer#119 (comment)