-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
mkYarnPackage: EACCES: permission denied, unlink '/nix/store/... #174114
Comments
My changes related to the use of functions and variables that aren't specific to yarn2nix at all. I don't maintainer yarn2nix and I'm not familiar with its implementation. |
@roberth ye I know, apologies for teh ping and pulling you into this. the form to create teh issue said:
Since as far as I can tell there are no mantainers listed, well Would you have any idea who to ping? |
Can you paste the contents of |
I tried running |
Apologies for the delay, took a little bit to figure out where teh outputs were kept.
It hit the max chars so I have attached it instead: yarn-error.log |
Yes, that offers no hints, see the upstream issue. |
Ah, didn't notice ye had replied again, hadn't refreshed the page. I hope more info comes to light that fixes this properly. Thank you for your time (both of you) |
This happens because Yarn is designed with the assumption that it can freely modify installed modules, which isn't going to work on store paths. Additionally Yarn tends to hard code store paths into its cache, which isn't traceable by Nix, so it can be difficult to find or predict which paths you would need to "copy" into a RW area. Even if you could, changing locator tags to point to the new location will cause yarn to rebuild every tarball in the cache. Honestly it's a mess. I've spent about 3 months trying to get a 6000+ package Yarn tool chain nixified and I've finally accepted that Yarn and Nix are incompatible "in the general case". You can definitely build a lot of stuff without issues, but Yarn's requirements for caching are fundamentally at odds with Nix's. This means you really have to build a full yarn cache from scratch in your derivation, and you can't recycle any parts of it in another - which really really sucks. The spots where you get in trouble are attempts to run NPM is significantly easier to work with and I strongly recommend it. |
Suddenly my project not building doesn't seem so bad.. |
Describe the bug
Using mkYarnPackage and it fails.
After searching for the error I came across this: nix-community/yarn2nix#53 , they seemed to have fixed it, but I dont know enough nix to understand how they fixed it.
On nixpkgs these two also seem to have been effected, but before
nix-community/yarn2nix
was merged in (#108138)Steps To Reproduce
You can find my source code and flake.nix at https://gitlab.com/Silvers_Gw2/Stats_Frontend/-/tree/cc5d783abd54e95363410592c390ca6925462262
nix build
Expected behavior
A normal build with no issues.
In shell it (manually) installs with no issues
Screenshots
Output of my
nix build
Additional context
Add any other context about the problem here.
Notify maintainers
I dont see any
meta.maintainers
, @roberth you are teh last person to commit to the default.nix so would you know who to pull in?Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: