!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

177 Members
51 Servers

Load older messages


SenderMessageTime
31 Oct 2024
@pxc:matrix.orgpxc *

I thought it was the other way around. --legacy-peer-deps doesn't have any real documentation the npm install docs afaict, which is annoying

at any rate, removing it made no difference :(

20:54:55
@pxc:matrix.orgpxc I'll try also adding --no-optional, I suppose 20:55:32
@pxc:matrix.orgpxc nope, esbuild is made about --no-optional. I guess if you use esbuild, optionalDependencies are actually required 🙃 20:58:07
@pxc:matrix.orgpxc * nope, esbuild is mad about --no-optional. I guess if you use esbuild, optionalDependencies are actually required 🙃 20:58:14
@lily:lily.flowersLily Foster
In reply to @pxc:matrix.org
nope, esbuild is made about --no-optional. I guess if you use esbuild, optionalDependencies are actually required 🙃
you can trivially get around that but also the problem here isn't optionalDependencies, but optional peerDependencies which are different
21:01:29
@lily:lily.flowersLily Foster* you can trivially get around that (search elsewhere in nixpkgs for prior art on esbuild insanity) but also the problem here isn't optionalDependencies, but optional peerDependencies which are different21:02:25
@pxc:matrix.orgpxc

well I have low confidence in the correctness but I did get a build that ran! since you pointed me at the npmFlags related to peer dependencies, I skimmed the NodeJS docs and decided to try --omit peer in place of --legacy-peer-deps, and the build succeeded

the tool does run from that build and at least some commands work

21:15:29
@lily:lily.flowersLily Fosteri mean if it runs and there's no obvious issues it's probably fine21:18:15
@lily:lily.flowersLily Fosteri forget if there is a knob to more directly exclude only optional peer deps and am on mobile or i'd just check the tool/code21:18:55
@pxc:matrix.orgpxcI'll switch to it on this machine (currently using the one from MacPorts) and test it for like a day then submit a PR21:19:03
@pxc:matrix.orgpxctyvvm for your help!21:23:00
1 Nov 2024
@gdesforges:matrix.org@gdesforges:matrix.org Is there a way to add a package to nodePackages without updating the entire set?
I'm following https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#adding-and-updating-javascript-packages-in-nixpkgs-javascript-adding-or-updating-packages
But when I run ./pkgs/development/node-packages/generate.sh it starts a super long script that I guess updates pkgs/development/node-packages/node-packages.nix in its entirety.
Is there some incremental update that I'm unaware of?
Context: https://github.com/NixOS/nixpkgs/issues/351203
17:30:18
@winter:catgirl.cloudWinteruse buildNpmPackage17:38:55
@winter:catgirl.cloudWinterdon't use nodePackages anymore17:39:16
@gdesforges:matrix.org@gdesforges:matrix.orgdang it! I just did it 😅17:51:29
@gdesforges:matrix.org@gdesforges:matrix.org * dang it! I just did it and created the PR 😅17:51:45
@lily:lily.flowersLily Fosteryeah nodePackages is very dead17:52:22
@lily:lily.flowersLily Fosterthough admittedly no one ever updated the docs before i left nixpkgs17:52:59
@gdesforges:matrix.org@gdesforges:matrix.org

so I switched it to buildNpmPackage, but it gets stuck after script patching
https://github.com/GuillaumeDesforges/nixpkgs/blob/8109150e8d773b115fcdb0ca5d9c2924c59cc9ca/pkgs/tools/typesetting/marp/default.nix

patching script interpreter paths in node_modules
node_modules/chrome-launcher/bin/print-chrome-path.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/jz54v1m0ldqivx5i45q8i05pz5clf842-nodejs-20.18.0/bin/node"
... many others, then it's stuck

and if I kill the nix-build the derivation becomes locked

21:16:19
@winter:catgirl.cloudWinterit's almost definitely not stuck21:16:55
@winter:catgirl.cloudWinterhow long were you waiting21:17:06
@gdesforges:matrix.org@gdesforges:matrix.org15 minutes21:17:16
@gdesforges:matrix.org@gdesforges:matrix.orgI've known some binary patching taking long, but this was weird21:18:09
@gdesforges:matrix.org@gdesforges:matrix.org * I've known some binary patching taking long, but this looks weird21:18:25
@gdesforges:matrix.org@gdesforges:matrix.org * I've known some binary patching taking long, but this looks weird for a npm package21:18:34
@gdesforges:matrix.org@gdesforges:matrix.org changed their profile picture.21:19:16
@winter:catgirl.cloudWintercan i get the full logs?21:20:50
@gdesforges:matrix.org@gdesforges:matrix.orgsure22:46:11
@gdesforges:matrix.org@gdesforges:matrix.orgmmmh so I rebooted and launched the build and it went beyond that point, unlike the two previous times. Might be a Nix bug?22:54:37
@winter:catgirl.cloudWinterunlikely22:56:45

Show newer messages


Back to Room ListRoom Version: 6