The following thread covered what looks like the same issue.
By using just - node/install-packages without any additional parameters you are defining a very general environment that defaults to ~/.npm which can include RO files and problems if your execution environment changes.
To be honest I do not use any of the CircleCI provided caching solutions as I use self hosted runners, which allow me to persist information on the runner or at a local proxy or repo depending on the task. This means I do not know the fine detail of what is going on in the .npm directory as I’ve never had an issue I’ve had to deal with.
I think the only issue with the orb is that it does not make clear the limitations of the defaults. There is no real alternative to using .npm/ as a default, but a lot happens under that directory, none of which the orb writer can track.
I guess the first question is - does it work if you set ‘with-cache’ to false or set ‘cache-version’ to a value other than ‘v1’ so invalidating the current cache?
If you set/change ‘cache-version’ and it works, does it still work when you re-run the job?
I’ll give these suggestions a try tomorrow. However, I suspect I’ll run into the same problems because this occurs on new branches where the initial job generates and stores a new cache. And subsequent jobs retrieve this new cache and yet get permission denied.