Nix NodeJS | 207 Members | |
| 58 Servers |
| Sender | Message | Time |
|---|---|---|
| 22 Apr 2023 | ||
| 17:38:50 | ||
| Hello, Any idea how to go around fixing such an error :
I tried running the | 17:41:27 | |
| https://0x0.st/HK-k.nix | 17:42:25 | |
In reply to @aktaboot:tchncs.deCan you share the yarn.lock? This is complaining about a syntax error in it and is coming from the upstream yarnpkg parser itself | 19:52:02 | |
In reply to @lily:lily.flowershttps://github.com/toeverything/AFFiNE/blob/v0.5.3/yarn.lock this is the yarn.lock | 19:59:39 | |
| Oh this is a yarn 2 lockfile | 20:19:14 | |
| We, uh, should probably make tooling to handle those soon | 20:19:30 | |
| 23 Apr 2023 | ||
| We can discuss it here Lily Foster indeed | 14:39:01 | |
| 15:06:40 | ||
In reply to @raitobezarius:matrix.org Apologies for possibly incoherent, run-on sentence brain dump (also Winter may also have some thoughts/ideas/plans, but this is my current understanding): Initially, we need to go ahead and get https://github.com/NixOS/nixpkgs/pull/206476 merged, and then get https://github.com/NixOS/nixpkgs/pull/206477 and https://github.com/NixOS/nixpkgs/pull/214454 cleaned up for merge (and also probably pull in https://github.com/winterqt/nixpkgs/commit/f78408065637e194fce1bfc3820954baef9efb74 to the latter PR before rebasing and cleaning it up) #206477 needs some minor bitrot figured out and I want to actually migrate the npm patching to the The head commit on #214454 and the other commit I linked is needed to fix some problems with assumptions the fetcher makes, both by correcting some assumptions and doing some changes in a lockfile fixup step to map onto some assumptions where reasonable (e.g. why bother fetching a dep more than once just because one node in the dep tree has a different hash type...) For npm workspaces, dotlambda tried adding an arg to We really should add a For yarn berry lockfile handling, we need to look closely at the new format and see what's different and if we even need to make that many updates to our existing fetcher. It's possible all it needs to work is to pull the newer lockfile parser (right now it pulls the legacy yarnpkg lockfile parser). We will also need yarn berry packaged: https://github.com/NixOS/nixpkgs/pull/214699 For pnpm lockfile handling, I have not looked at this at all. Ideally it's just a new format to parse and can map onto how we generally make fetchers already (even better: making it another frontend to the existing We currently only look for package-lock.json in We probably will want to continue adding more documentation, to describe corner cases and how to account for them (the diagnostic messages on build failure already do some of that and it's not so bad right now. Some of the above future-stuff will just need it) | 15:07:20 | |
| (And I would just say screw git deps to simplify quite a lot, but they're frustratingly common) | 15:16:17 | |
| 16:30:10 | ||
| 24 Apr 2023 | ||
Oh also at some point we need to get a migration plan for the nodePackages set, because node2nix makes me sad | 15:50:40 | |
In reply to @lily:lily.flowersWould love to see pnpm handled soon! | 18:36:30 | |
| I had just found a workaround for Woodpecker's WebUI which migrated from yarn (by using a tool to convert pnpm lock to yarn lock format) | 18:36:30 | |
| And the following week they bumped their version of pnpm which isn't supported by the tool :'( | 18:36:31 | |
| Given that that tool exists though, I do believe it should be possible to add it to nixpkgs (somewhat) easily | 18:36:31 | |
| * | 18:36:32 | |
In reply to @ambroisie:belanyi.frbe the change you want to see in the world ig 😄 | 20:15:05 | |
In reply to @hexa:lossy.networkI have yet to allocate enough time for this yak shave | 20:17:03 | |
| so does everyone else 🙂 | 20:17:18 | |
| Literally my only experience with JS is packaging WebUIs for services I wanted to run on NixOS 🙃 | 20:17:40 | |
In reply to @ambroisie:belanyi.frYeah stuff like that can at a minimum be short-term fixes. Ideally we'd be able to parse them natively with our tooling, and a quick look at the lockfile format does seem to indicate it's very possible. I'm not sure if it can handle npm's cacache or anything though and we'd need to write a builder for it probably | 20:28:26 | |
| Yes no, I meant that if the tool can do the translation offline then we can do it in Nix | 20:29:01 | |
| Didn't make myself clear, sorry | 20:29:09 | |
| Ah, thanks for the clarification | 20:29:47 | |
| NPM has a CA cache? | 20:29:49 | |
In reply to @ambroisie:belanyi.frcacache is their cache format for downloads and such (I think it's short for "content-addressed cache" but I'd have to look it up to be sure). This is how fetchNpmDeps stores dependencies so that npm can naturally pick up and deal with them offline | 20:31:35 | |
| 25 Apr 2023 | ||
| https://github.com/NixOS/nixpkgs/pull/206476 has been merged 🎉 I'll try to clean up the other two PRs tomorrow or Wednesday | 00:28:43 | |
| 28 Apr 2023 | ||
| 08:42:58 | ||