!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

180 Members
51 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
31 Oct 2024
@lily:lily.flowersLily Foster
In reply to @pxc:matrix.org
utf-8-validate is a dependency of @wessberg/ts-evaluator as well but I don't see it in my node_modules when debugging with nix-shell
i did actually make a shellHook for buildNpmPackage packages to make that sort of check work, but i'm not contributing to nixpkgs anymore so oh well i guess
20:29:51
@pxc:matrix.orgpxcthat sucks, but I understand20:30:32
@pxc:matrix.orgpxc it looks like utf-8-validate appears multiple times in the dependency tree, and at least once as just a first-order dependency (and not a devDependency). Are you sure they're all eliminable 20:31:31
@lily:lily.flowersLily Fosteri'd give snippet for disabling optional peer deps in npmInstallFlags or whatever it is, but i'm on mobile rn sadly20:31:33
@pxc:matrix.orgpxcty!20:31:43
@lily:lily.flowersLily Foster
In reply to @pxc:matrix.org
it looks like utf-8-validate appears multiple times in the dependency tree, and at least once as just a first-order dependency (and not a devDependency). Are you sure they're all eliminable
all of the old ones that still try to build fat executables are from optional peer deps from microsoft etc pinning an ancient version of ws for some godawful reason
20:33:01
@lily:lily.flowersLily Fosterso they don't have to be all eliminable20:33:23
@pxc:matrix.orgpxcgot it20:33:32
@pxc:matrix.orgpxc
In reply to @lily:lily.flowers
i'd give snippet for disabling optional peer deps in npmInstallFlags or whatever it is, but i'm on mobile rn sadly

this was enough for me to find the flag and plenty of examples in Nixpkgs, if the flag was --legacy-peer-deps

but this package already used that, and unlike the version I had building as part of nodePackages, even the newer version still fails to build with that same message

20:47:37
@pxc:matrix.orgpxc
In reply to @lily:lily.flowers
i'd give snippet for disabling optional peer deps in npmInstallFlags or whatever it is, but i'm on mobile rn sadly
*

this was enough for me to find the flag and plenty of examples in Nixpkgs, if the flag was --legacy-peer-deps

but this package already used that, and unlike the version I had building as part of nodePackages, even the newer version pulled in directly by bitwarden-cli still fails to build with that same message

20:47:57
@lily:lily.flowersLily Foster
In reply to @pxc:matrix.org

this was enough for me to find the flag and plenty of examples in Nixpkgs, if the flag was --legacy-peer-deps

but this package already used that, and unlike the version I had building as part of nodePackages, even the newer version still fails to build with that same message

oh then take that out. i was wondering why it would be including peer deps at all without that flag
20:48:27
@lily:lily.flowersLily Fosterlegacy-peer-deps does the opposite of what i suggested20:48:44
@lily:lily.flowersLily Fosterby overeagerly including them20:48:55
@pxc:matrix.orgpxcI thought it was the other way around at any rate, removing it made no difference :(20:53:33
@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

Show newer messages


Back to Room ListRoom Version: 6