Nix NodeJS | 211 Members | |
| 60 Servers |
| Sender | Message | Time |
|---|---|---|
| 9 May 2023 | ||
Hi, I'm trying to create a derivation for a React package using buildNpmPackage. However, both buildNpmPackage and prefetch-npm-deps always fail with Error: https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.19.1.tgz: Connection Failed: tls connection init failed: Connection reset by peer (os error 104). Which package failed varies between retries. What could cause that? | 10:34:20 | |
In reply to @denbrahe:matrix.orgSometimes the registry connection fails or gets dropped on wifi for me. Retry until it works I guess. I plan to add retry logic to the fetcher so those transient error don't cause the entire fetch to fail | 10:46:39 | |
It fetches in parallel, so you might be able to set --cores 1 on the nix build command to disable that (I forget if it respects that or not) | 10:47:14 | |
Ok, thank you! If I understand correctly, prefetch-npm-deps adds the cache to the Nix store, so if I get prefetch-npm-deps to work buildNpmPackage should also work? | 10:52:13 | |
| It does not add it to the store by default | 10:56:12 | |
| You'd have to actually use nix build for it to go to the store | 10:56:32 | |
| Okay, I'll just loop nix-build then. Thanks! | 10:57:49 | |
Try --cores 1 on your nix-build command if you haven't already, since that might help | 10:58:45 | |
(Or maybe it's only --option cores 1 for the old cli... i forget) | 10:59:11 | |
| I'll try both 😛 | 11:03:40 | |
| 100 retries, got nothing. Is this normal? It's a small project, only notable deps are react and typescript | 11:32:01 | |
| Nope that's not normal. I'll see if I can get retry logic working today and will let you try it, if you can't get a successful build before then | 11:42:27 | |
| Also if it's ignoring nix's NUM_JOBS setting then I'll fix that too | 11:42:42 | |
In reply to @lily:lily.flowers opened an issue, Do you know what needs to be done for that to work ? I am not sure where the parsing functions for yarnLock are defined, I guess we would add a | 13:57:11 | |
| It uses upstream @yarnpkg/lockfile, but an older pre-berry version | 13:58:44 | |
| berry is newer ? | 14:00:07 | |
| Yes. Yarn 2+ is berry | 14:02:52 | |
In reply to @lily:lily.flowersdoes that seems more like a package upstream issue ? | 14:04:32 | |
It's not an upstream issue, we don't use the upstream parser yet. I haven't tried to see if that's the only requirement for fetchYarnDeps to work | 14:07:53 | |
| yarn2nix is hecked for berry though | 14:08:00 | |
| (also I'm not trying to put pressure on you in any way :), I just wanted to open an issue for the record and other people to see eventually) | 14:08:23 | |
In reply to @lily:lily.flowersoh, is there ongoing work on that ? 👀 | 14:09:11 | |
In reply to @aktaboot:tchncs.deyarn2nix makes me sad. So unless someone else is, no. We are creating buildYarnPackage, fetchYarnDeps, and stuff to just have shiny new stuff to use | 14:16:58 | |
In reply to @aktaboot:tchncs.deYeah it's no pressure and I do need to make an issue (just been busy and currently busy at $dayjob) | 14:17:23 | |
| Oh I see you already made an issue. Thank you aktaboot ❤ | 14:24:23 | |
| 10 May 2023 | ||
| 22:45:15 | ||
What's the current state of packaging apps that use yarn v3 lockfiles? Is the only option yarn-plugin-nixify and committing the giant generated yarn-project.nix? | 22:48:14 | |
In reply to @quentinmit:matrix.orgPretty much just that. Or locking your own npm package-lock.json and using buildNpmPackage | 23:03:32 | |
| Unfortunately | 23:03:43 | |
In reply to @lily:lily.flowersAre there issues I can follow for this? | 23:19:07 | |