I also kept facing the cache miss issue where it would install and then towards the end just get stuck and i couldn't kill terminal.
But after i updated nodejs version i managed to run npm install again and it worked.