@Priyassk thank you. The stack trace is extremely helpful.
The EISDIR error appears to occur inside chownr when cacache tries to fix the ownership of the directory it just created (not when it’s trying to read from the cache). In other words, the error occurs because npm is run under sudo (and it tries to respect the invoking user’s permissions, taking a special path only taken under sudo.)
I don’t immediately see a reason for this error, but now the search might shift away from npm/cacache proper to chownr (and possibly platform-specifics of node/libuv). It appears that npm/cacache acts the way it should.
As for possible work-arounds, I don’t think this issue can be fixed by resetting your permissions. Rather, you’ll have to read up on a way to run npm without ever using sudo (usually by resetting permissions once - or wiping your ~/.npm via sudo, then setting a different prefix, using a node version manager, etc. See here for a start.
It is a bit unfortunate IMO that the node/npm maintainers do not support the default installations of node on 2 widely used architectures (Linux + MacOS) properly.)