Try updating your npm.
After brew update the above command worked for me.
But I don't think it's compatible with Alfred 4 😞 (after "install" it is nowhere to be found in the list of Alfred's workflows)
In the meantim I'm using OneHighlighter - https://apps.apple.com/us/app/onehighlighter/id1131580917