Nix NodeJS | 194 Members | |
| 56 Servers |
| Sender | Message | Time |
|---|---|---|
| 30 Apr 2024 | ||
| Maybe I'm wrong about nodejs_18, but I'm quite sure I saw it in the logs at some point. Anyway, in my previous fixed-point derivation I had to update my package-lock.json and with fetchNpmDeps I didn't have to do that which I really like 😄 | 20:37:20 | |
| I think that project used nodejs_16 but I'm okay with changing the version | 20:38:15 | |
i mean you can just use the nodejs attr which should always be latest LTS | 20:44:07 | |
| unless it has C++ code in which case, nodejs breaks that a little between versions and you may want to pin one | 20:44:28 | |
| (fwiw current LTS is nodejs_22 as of a few days ago) | 20:45:20 | |
| (apparently) | 20:45:26 | |
| Here's a working version: https://github.com/MatejaMaric/yota-laravel/blob/c114ebc3c725a67a19d148a95543ed307094c659/derivation.nix Thanks a lot Lily! 🤗 | 20:45:42 | |
| oh heck yeah, that's awesome :) | 20:45:58 | |
Yeah, I'll pin it. I had to add | 20:46:28 | |
In reply to @matejam:matrix.org(if you want, you can set npmBuildScript = "prod" and include npmBuildHook as well) | 20:46:36 | |
In reply to @matejam:matrix.org* (if you want, you can set npmBuildScript = "prod" and include npmBuildHook as well and remove the postBuild) | 20:46:41 | |
| Iirc, the nodejs 22 LTS has some problems with node gyp. You might want to stick with 18 for a few more weeks until testing has been done | 20:46:49 | |
In reply to @c0ba1t:matrix.orgwell if they're using npmHooks and nodejs, it'll be 20 for a bit | 20:47:13 | |
i don't think nixpkgs has set nodejs = nodejs_22 yet (just node_20) | 20:47:27 | |
In reply to @c0ba1t:matrix.org(also what problems? that's concerning if their build tool didn't work on release....) | 20:47:44 | |
| ( | 20:47:54 | |
Hm, for some reason if I do that it doesn't generate files that | 20:56:46 | |
| Iirc, it is on 22 on unstable. I don't remember the specifics but an unstable bum recently made our builds fail until we returned to 18. Iirc, it was similar to https://github.com/nodejs/node-gyp/issues/3029 | 20:59:57 | |
In reply to @matejam:matrix.orgshare derivation? (e.g. on a pastebin?) that seems weird | 21:00:53 | |
| oh you know what | 21:01:00 | |
In reply to @c0ba1t:matrix.orgbut it was 20 before 22, did 20 not work either? | 21:01:19 | |
In reply to @lily:lily.flowersi wonder if it's because the composer stuff changes build to that dir first | 21:02:06 | |
| if it's working now, leave it as-is then :) | 21:02:13 | |
Yeah, maybe even the other way around. In the logs I see first the npm runs and then composer>
sure 😄
If you are interested, I can make a new branch with the change. It's my open source project anyway | 21:04:59 | |
*
Yeah, maybe even the other way around. In the logs I see first the npm runs and then composer.
sure 😄
If you are interested, I can make a new branch with the change. It's my open source project anyway | 21:05:17 | |
In reply to @matejam:matrix.orgnah, i'm pretty sure it's because composer changes dir and you want npm to run after that. so you're doing it right enough and this looks pretty awesome actually :) | 21:05:34 | |
| it feels neat that you are able to mix the npm hooks into another builder without too much fuss and have a multi-language-package-manager app build in a derivation like that | 21:06:10 | |
In reply to @c0ba1t:matrix.orgoooof. well marsam left and i'm recovering from surgery, so someone else will probably have to bump the nodejs derivation | 21:09:32 | |
In reply to @lily:lily.flowers(no one else is on nodejs team rn except winter who also hasn't had time for things....) | 21:10:15 | |
Yeah, Composer also has it's own version of fetchNpmDeps (mkComposerRepository) but I couldn't really make it work. I don't know how it would handle 3 or more language app builds 😂 I'm glad that it works for 2 | 21:10:14 | |