-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove symlink resolve and add force flag to copy cache operation #57
base: master
Are you sure you want to change the base?
Conversation
this change causes issues on linux 🤦
|
4f4c7a2
to
5016c7a
Compare
that extra commit creates support for both linux and darwin, but I'd love to have another darwin user confirm this |
Hi! I was running in to another issue related to the npm-cache on darwin: error: builder for '/nix/store/n21bw1ia9aivg0fq3d4mzf452w1040lg-foo-1.0.0.drv' failed with exit code 1;
last 8 log lines:
> unpacking sources
> unpacking source archive /nix/store/6rivb57skw999c1qiwr54ch2v1jhmhhb-11sr8qcnqlchbrgvkdchzbm1ar7cig53-source
> source root is 11sr8qcnqlchbrgvkdchzbm1ar7cig53-source
> patching sources
> configuring
> cp: cannot create special file '/private/tmp/nix-build-foo-1.0.0.drv-0/11sr8qcnqlchbrgvkdchzbm1ar7cig53-source/npm-cache/_cacache/tmp/com.apple.launchd.jUMDGJPbBh/Listeners': Operation not permitted
> cp: cannot create special file '/private/tmp/nix-build-foo-1.0.0.drv-0/11sr8qcnqlchbrgvkdchzbm1ar7cig53-source/npm-cache/_cacache/tmp/mongodb-27017.sock': Operation not permitted
> cp: cannot copy a directory, '/nix/store/nfxfhqlckv4z3w93j5r3k69k6awv0q0g-foo-1.0.0-node-modules/npm-cache', into itself, '/private/tmp/nix-build-foo-1.0.0.drv-0/11sr8qcnqlchbrgvkdchzbm1ar7cig53-source/npm-cache'
For full logs, run 'nix log /nix/store/n21bw1ia9aivg0fq3d4mzf452w1040lg-foo-1.0.0.drv'. When trying out your fork @hlolli I managed to get a bit further in the process, but the build fails because I for some reason have root owned files in npm-cache? No idea why as of yet. error: builder for '/nix/store/4sjiwiqnzsglwac6lxxi9jawdwzs19r5-foo-1.0.0.drv' failed with exit code 243;
last 10 log lines:
> npm ERR!
> npm ERR! Your cache folder contains root-owned files, due to a bug in
> npm ERR! previous versions of npm which has since been addressed.
> npm ERR!
> npm ERR! To permanently fix this problem, please run:
> npm ERR! sudo chown -R 501:20 "/nix/store/1wk888bpzy9m0k21b02qyhqakr2855as-foo-1.0.0-node-modules/npm-cache"
>
> npm ERR! Log files were not written due to an error writing to the directory: /nix/store/1wk888bpzy9m0k21b02qyhqakr2855as-foo-1.0.0-node-modules/npm-cache/_logs
> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
>
For full logs, run 'nix log /nix/store/4sjiwiqnzsglwac6lxxi9jawdwzs19r5-foo-1.0.0.drv'. |
@iensu could it be related that you're running as nixbld user and not root? I keep seeing $whoami => root, which could explain why I don't see it. But in the case you're not root user while building, I guess we'll need chmod? |
5016c7a
to
a9be5bf
Compare
this could be an darwin specific issue, but after the latest merge I'm unable to build (see my comment here #54 (comment)). But I did also experience the same issue as this PR #54 addresses and was able to make the cache copy operation happy. It seems it wants to copy directories into itself and that sorts of stuff.