Open lu911 opened 2 years ago
This seems to only occur when using a machine image (at least in my experience).
I was having this issue too, in my experience it seems like when using a machine image it sometimes picks up hosts with cached files from other pipeline runs. I got around the issue by deleting the ~/.npm
folder before trying to restore the cache…
- run: rm -rf ~/.npm
- node/install-packages
Funny enough, it seems to happen with other tools like nvm. The cache (/opt/circleci/.nvm/.cache
) has already a bunch of files when starting the machine.
- run: rm -rf ~/.npm - node/install-packages
This worked for me as well. Thanks for the tip @eaviles!
Hey folks, sorry for the delay. I have replicated the issue and working with the image folks to see what we can do.
I ran into this one too. chmod -R u+w ~/.npm
sorted it for me.
I wouldn't recommend nuking the folder.
As far as I can tell, this is actually a symptom of flaws in the restore_cache
functionality; if that was made to work correctly, this wouldn't be a problem.
@KyleTryon has there been any progress on this issue?
This image had been resolved, we should have closed this issue. Are you experiencing this again? Is it also on the machine? @DominicGBauer
I'm experiencing this issue with the following:
jobs:
test:
docker:
- image: cimg/node:21.7.1
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
the proposed workarounds don't work for me: '/home/circleci/.npm': No such file or directory
@warrenronsiek can you provide more details on the issue you have? The exact error, the orb version. The original issue was related to machine executors, so your issue is probably different.
Orb version: 5.0.2
What happened:
Getting "Permission Denied" while restore npm cache.
error:
config.yml:
Expected behavior:
The cache is restored without errors.
Additional Information: