Nix NodeJS | 209 Members | |
| 60 Servers |
| Sender | Message | Time |
|---|---|---|
| 8 Nov 2023 | ||
(env does not) | 16:20:46 | |
* so you could add your own npmDeps | 16:25:32 | |
| I first tried the postpatch but eval failed on it, I just realized I used the wrong quote in export 🤦♂ | 16:27:02 | |
| Thanks for helping me out, this did the trick | 16:27:19 | |
| I spent two days to figure out this, and couldn't | 16:28:22 | |
| Awesome, glad that worked! | 16:29:21 | |
| Let me know if you have other issues with it | 16:29:27 | |
| 9 Nov 2023 | ||
| 14:27:08 | ||
| I am trying to build a frontend with mkYarnPackage but it fails on download for this lockfile
The error is:
I'm not sure why the hash doesn't align | 15:29:00 | |
| That looks interesting, Have you tried to refresh the npmDeps Hash? | 15:34:42 | |
| I'm not defining it's just: mkYarnPackage { name = "node-modules"; src=./.; } | 15:40:15 | |
In reply to @szucsitg:matrix.orgwhat is the hash in the lockfile? it's not in your snippet | 15:43:29 | |
| If you start a new yarn project it's getting added like this 🤷 | 15:45:33 | |
| Is that the entire file? | 15:46:13 | |
| Yes, that's my full test repo lock file. The original project has like 3k deps, I'm trying to isolate the issue | 15:47:05 | |
In reply to @szucsitg:matrix.orgAnd this is your entire derivation? | 15:47:56 | |
| No, it's not. But it doesn't get to mkDerivation that would depend on the node-modules | 15:48:57 | |
| I can upload the sample if that would help | 15:52:44 | |
| The funny thing I get a different hash in my test project than in my original for the very same lines in the lockfile | 15:53:34 | |
| Actually it's keeps changing as I scroll back | 15:54:25 | |
In reply to @szucsitg:matrix.orgyeah that probably would help. i'm trying to figure out where that hash is coming from at all | 15:56:38 | |
| https://gist.github.com/szucsitg/70fe7ca82c51d30208595cd04b8bd7c5 | 16:05:24 | |
In reply to @szucsitg:matrix.orgI may not be understanding something, but why would you have a separate node-modules derivation here and then just use stdenv.mkDerivation to build what is a yarn package? | 16:07:34 | |
In reply to @szucsitg:matrix.org* I may not be understanding something, but why would you have a separate node-modules derivation here and then just using stdenv.mkDerivation to build what is a yarn package? | 16:07:40 | |
| Maybe my pattern is completely off, but there's not much documentation around mkYarnPackage. Also ultimately due to the project structure we install packages in root, then build in a subfolder 3 levels down | 16:09:51 | |
| So I thought this way I have fight less with nix patterns at the end | 16:10:23 | |
mkYarnPackage is designed to build yarn packages, and the fact that it makes a node_modules folder at all is just a byproduct of that. I feel like you'll have an easier time without that indirect, especially since running yarn plain like you are now won't actually work without the setup stuff that mkYarnPackage does | 16:11:38 | |
* mkYarnPackage is designed to build yarn packages, and the fact that it makes a node_modules folder at all is just a byproduct of that. I feel like you'll have an easier time without that indirection, especially since running yarn plain like you are now won't actually work without the setup stuff that mkYarnPackage does | 16:11:47 | |
| still isn't gonna fix the error you came in here for though | 16:12:34 | |
| i'm looking into that | 16:12:36 | |