!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

180 Members
51 Servers

Load older messages


SenderMessageTime
28 Mar 2025
@beviu:matrix.orgbeviu joined the room.14:55:15
@tweqx:matrix.orgtweqx joined the room.15:03:57
@beviu:matrix.orgbeviu Hi, we would like to package Overleaf based on work from an existing draft PR at https://github.com/NixOS/nixpkgs/pull/216889. One problem with Overleaf is that it has Git dependencies in its package.json file that have build scripts but do not have a package-lock.json file, and fetch-npm-deps doesn't support that (and rightly so, because it would not be reproducible). In that PR, the authors created a Python scripts that finds the Git dependencies in package.json, clones them, modifies the package.json to point to the clone, then run npm install to update the package-lock.json with the Git dependencies' transitive dependencies and commit that patched package-lock.json to Nixpkgs. We have a different idea where we would build the Git dependencies individually using buildNpmPackage, and then in the prePatch phase of Overleaf, we would modify the package-lock.json file in the prePatch phase to replace the Git dependencies with local dependencies that point to the output of the buildNpmPackage derivations. This would require modifying fetch-npm-deps to accept local dependencies (at least those that point to the Nix store in the form of "resolved": "/nix/store/..."). Do you think this would be the best approach? Would Nixpkgs accept a change to fetch-npm-deps to accept local dependencies? If so, maybe add a flag like --store-dir to fetch-npm-deps to tell it the location of the store (/nix/store) and only allow local dependencies under this directory? 15:12:13
@beviu:matrix.orgbeviu * Hi, we would like to package Overleaf based on work from an existing draft PR at https://github.com/NixOS/nixpkgs/pull/216889. One problem with Overleaf is that it has Git dependencies in its package.json file that have build scripts but do not have a package-lock.json file, and fetch-npm-deps doesn't support that (and rightly so, because it would not be reproducible). In that PR, the authors created a Python script that finds the Git dependencies in package.json, clones them, modifies the package.json to point to the clones, then runs npm install to update the package-lock.json with the Git dependencies' transitive dependencies and commit that patched package-lock.json to Nixpkgs. We have a different idea where we would build the Git dependencies individually using buildNpmPackage, and then in the prePatch phase of Overleaf, we would modify the package-lock.json file to replace the Git dependencies with local dependencies that point to the output of the buildNpmPackage derivations. This would require modifying fetch-npm-deps to accept local dependencies (at least those that point to the Nix store in the form of "resolved": "/nix/store/..."). Do you think this would be the best approach? Would Nixpkgs accept a change to fetch-npm-deps to accept local dependencies? If so, maybe add a flag like --store-dir to fetch-npm-deps to tell it the location of the store (/nix/store) and only allow local dependencies under this directory? 15:13:55
29 Mar 2025
@tweqx:matrix.orgtweqx It unfortunately turns out we cannot do this because the package-lock.json file contained in the npmDeps derivation will depend on the store path location, meaning that npmDepsHash won't fixed :(( 19:59:02
1 Apr 2025
@strum355:matrix.orgstroem changed their display name from stroem - sourcegraph to stroem.09:41:48
@sandro:supersandro.deSandro 🐧 changed their display name from Sandro 🐧 to Sandro 🐧 [c3d2].13:58:31
@sandro:supersandro.deSandro 🐧 changed their display name from Sandro 🐧 [c3d2] to Sandro 🐧.13:58:32
@tumble1999:matrix.orgTumble

bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/posts/updates/mm/mm-update-65/index.html from ./_posts/2023-08-31-mm-update-65.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/blog/index.html from ./_lists/blog.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/root/index.html from ./_lists/root.md (liquid)
bmod> [11ty] Writing /nix/store/sjl5mghgzs9hrhzkkjr4vwnmr02zd0dx-bmod-static/bmod/index.html from ./_lists/bmod.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/bmod/index.html from ./_lists/bmod.md (liquid)
bmod> [11ty] Writing /nix/store/sjl5mghgzs9hrhzkkjr4vwnmr02zd0dx-bmod-static/mm/index.html from ./_lists/mm.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/mm/index.html from ./_lists/mm.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/documents/index.html from ./_lists/documents.md (liquid)
bmod> /nix/store/blp465c3ps5841lx2l1ip5qvpw74wb9r-npm-build-hook/nix-support/setup-hook: line 3: 276 Killed npm run ${npmWorkspace+--workspace=$npmWorkspace} "$npmBuildScript" $npmBuildFlags "${npmBuildFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"
bmod> ERROR: npm build failed
bmod> Here are a few things you can try, depending on the error:
bmod> 1. Make sure your build script (static:build) exists
bmod> If there is none, set dontNpmBuild = true.
bmod> 2. If the error being thrown is something similar to "error:0308010C:digital envelope routines::unsupported", add NODE_OPTIONS = "--openssl-legacy-provider" to your derivation
bmod> See https://github.com/webpack/webpack/issues/14532 for more information.
error: builder for '/nix/store/3q5gmxkpwxpxbm9fr47ixyl6b4r0bgng-bmod.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/0qdymn0fajkb0ri1nsrgl4d3ncjhlqzl-Caddyfile.drv' failed to build
error: 1 dependencies of derivation '/nix/store/48b8rwdm9kigwa5bnjhab339zshrd6dl-unit-bmod-prod-webhook.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/65gqn3vqdyirxqag3mpfvyx78p5vphp3-Caddyfile-formatted.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nxj1v1lq33k0nhbxp6vq3d08zlxy0hq3-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8cnb2wb3m3im4g936m8d48vg2qshmyhd-nixos-system-blutsauger-25.05.20250330.52faf48.drv' failed to build

why do i get this error when it doesnt seem like anything failed?

17:30:47
@tumble1999:matrix.orgTumble *
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/posts/updates/mm/mm-update-65/index.html from ./_posts/2023-08-31-mm-update-65.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/blog/index.html from ./_lists/blog.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/root/index.html from ./_lists/root.md (liquid)
bmod> [11ty] Writing /nix/store/sjl5mghgzs9hrhzkkjr4vwnmr02zd0dx-bmod-static/bmod/index.html from ./_lists/bmod.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/bmod/index.html from ./_lists/bmod.md (liquid)
bmod> [11ty] Writing /nix/store/sjl5mghgzs9hrhzkkjr4vwnmr02zd0dx-bmod-static/mm/index.html from ./_lists/mm.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/mm/index.html from ./_lists/mm.md (liquid)
bmod> [11ty] Writing /nix/store/a1bwpqqchlv5slmw8fn6bp0fxcqv42ds-bmod-static/documents/index.html from ./_lists/documents.md (liquid)
bmod> /nix/store/blp465c3ps5841lx2l1ip5qvpw74wb9r-npm-build-hook/nix-support/setup-hook: line 3:   276 Killed                  npm run ${npmWorkspace+--workspace=$npmWorkspace} "$npmBuildScript" $npmBuildFlags "${npmBuildFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"
bmod> ERROR: `npm build` failed
bmod> Here are a few things you can try, depending on the error:
bmod> 1. Make sure your build script (static:build) exists
bmod>   If there is none, set `dontNpmBuild = true`.
bmod> 2. If the error being thrown is something similar to "error:0308010C:digital envelope routines::unsupported", add `NODE_OPTIONS = "--openssl-legacy-provider"` to your derivation
bmod>   See https://github.com/webpack/webpack/issues/14532 for more information.
error: builder for '/nix/store/3q5gmxkpwxpxbm9fr47ixyl6b4r0bgng-bmod.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/0qdymn0fajkb0ri1nsrgl4d3ncjhlqzl-Caddyfile.drv' failed to build
error: 1 dependencies of derivation '/nix/store/48b8rwdm9kigwa5bnjhab339zshrd6dl-unit-bmod-prod-webhook.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/65gqn3vqdyirxqag3mpfvyx78p5vphp3-Caddyfile-formatted.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nxj1v1lq33k0nhbxp6vq3d08zlxy0hq3-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8cnb2wb3m3im4g936m8d48vg2qshmyhd-nixos-system-blutsauger-25.05.20250330.52faf48.drv' failed to build

why do i get this error when it doesnt seem like anything failed?

17:31:00
@tumble1999:matrix.orgTumble

it only happens in a nixos-rebuild switch and its random

but trying to iscolate things like testhing with nixos-rebuild build
or sepcifically doing nix-build on the node project specifically, things work fine

17:38:57
3 Apr 2025
@sandro:supersandro.deSandro 🐧mentions dmesg something? maybe oom?11:26:45
5 Apr 2025
@tinybronca:sibnsk.net@tinybronca:sibnsk.net removed their display name underpantsgnome.15:54:34
@tinybronca:sibnsk.net@tinybronca:sibnsk.net left the room.15:59:24
7 Apr 2025
@tumble1999:matrix.orgTumblehttps://gitlab.com/balancemod/main-site-nixos/-/jobs/9642696398#L945 Here it is again11:09:51
@tumble1999:matrix.orgTumble`/nix/store/blp465c3ps5841lx2l1ip5qvpw74wb9r-npm-build-hook/nix-support/setup-hook: line 3: 276 Killed npm run ${npmWorkspace+--workspace=$npmWorkspace} "$npmBuildScript" $npmBuildFlags "${npmBuildFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"` Why 276 killed Is it like a timeout thing?11:11:35
11 Apr 2025
@ambroisie:belanyi.fr@ambroisie:belanyi.fr left the room.22:09:11
12 Apr 2025
@aidalgol:matrix.orgaidalgol

The package heroic (actually heroic-unwrapped) has a sporadic build failure, at least on my local system, that looks like this. I'm not sure it's the same file, but the message is always resource temporarily unavailable, copyfile.

ERR_PNPM_EAGAIN  EAGAIN: resource temporarily unavailable, copyfile '/build/tmp.ltqPqcK0pE/v3/files/f8/561afcf3e85e0a23f3b4948708b49e581be80361b6fb5c045523d6007ffa2fb3ea6a41a2e5a7f397d8863ca15b121df311054ba1c7aff544a078b1b325fe7f' -> '/build/source/node_modules/sanitize-html_tmp_69/LICENSE'

I have no clue what's going on here. This just happens sometimes when I'm working on changes to the derivation, and it always succeeds the next time.

20:22:01
13 Apr 2025
@c0ba1t:matrix.orgCobalt
In reply to @aidalgol:matrix.org

The package heroic (actually heroic-unwrapped) has a sporadic build failure, at least on my local system, that looks like this. I'm not sure it's the same file, but the message is always resource temporarily unavailable, copyfile.

ERR_PNPM_EAGAIN  EAGAIN: resource temporarily unavailable, copyfile '/build/tmp.ltqPqcK0pE/v3/files/f8/561afcf3e85e0a23f3b4948708b49e581be80361b6fb5c045523d6007ffa2fb3ea6a41a2e5a7f397d8863ca15b121df311054ba1c7aff544a078b1b325fe7f' -> '/build/source/node_modules/sanitize-html_tmp_69/LICENSE'

I have no clue what's going on here. This just happens sometimes when I'm working on changes to the derivation, and it always succeeds the next time.

Sporadic error sounds like the lockfile handling in pnpm might be unstable. Maybe check if you can find a reproducable example and compare the lockfile against a working one.
07:23:52
@c0ba1t:matrix.orgCobaltThe error looks weird though. 07:24:29
15 Apr 2025
@ayatsfer:matrix.orgFernando joined the room.06:37:16
@ayatsfer:matrix.orgFernandoHi, just wanted to ask if there's any way to build a local pnpm project without having to pass the hash of the pnpm.fetchDeps06:38:27
@ayatsfer:matrix.orgFernando this is possible with npm by using importNpmLock { npmRoot = ./.; }; 06:38:44
@ayatsfer:matrix.orgFernandomaybe it can be done with some IFD...06:38:57
@transcaffeine:finallycoffee.eutranscaffeine meow, how do i deal with sqlite3 in fetchYarnDeps not adding the lib/bindings/node-*-$os-$arch/node_sqlite3.node to the offline yarn cache? 18:38:08
16 Apr 2025
@winter:catgirl.cloudWinterbuild it yourself: https://github.com/NixOS/nixpkgs/blob/2631b0b7abcea6e640ce31cd78ea58910d31e650/pkgs/by-name/th/thelounge/package.nix#L8006:26:26
@winter:catgirl.cloudWinterthough it definitely should be added06:26:32
@lxsameer:matrix.orglxsameer joined the room.12:32:58
@lxsameer:matrix.orglxsameerhey folks, is there any doc or tool for integrating a pnpm project with nix?12:36:01
@sandro:supersandro.deSandro 🐧please see https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#pnpm-javascript-pnpm14:22:52

Show newer messages


Back to Room ListRoom Version: 6