I am having an issue with this command in terminal on a macbook (sudo npm install -g aws-azure-login --unsafe-perm) with M1 chip. My colleagues do not have this issue. I have tried many things but no luck.
I am using nodejs 18.
This was resolved only after the git credentials prompt came up when trying to do a pull on an unrelated project. So after authenticating with git, the npm install worked. This was very misleading and annoying but will leave this here in case someone else has the issue.