!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

199 Members
57 Servers

Load older messages


SenderMessageTime
12 Jan 2024
@marie:marie.cologneMarieweird, i'll try this on another machine13:06:02
@lily:lily.flowersLily Foster *

fwiw btw, here's a derivation i'm using that makes a seemingly-usable appium bin (and package-lock.json is the version i generated myself):

{ fetchFromGitHub, buildNpmPackage, yq-go }:
let
  version = "2.4.1";
in buildNpmPackage {
  pname = "appium";
  inherit version;

  src = fetchFromGitHub {
    owner = "NyCodeGHG";
    repo = "appium";
    # rev = "appium@${version}";
    rev = "3531a7c72309b858a4b7a0b7180bfdb645c65cd1";
    hash = "sha256-8RJB5MKL+N1ZbX4TUcnWUyfIdZJiG2EFkdgiQ64yJb0=";
  };

  npmDepsHash = "sha256-ZMeiwUEd2R54v2x0JUGhjU2MHGCRrXDiTYwA3Bk1MxY=";

  nativeBuildInputs = [ yq-go ];

  postPatch = ''
    cp ${./package-lock.json} ./package-lock.json
  '';

  preConfigure = ''
    yq -iPo json '. +  {"bin": {"appium":"packages/appium/index.js"}}' ./package.json
  '';
}
13:06:14
@marie:marie.cologneMarieit works fine on another machine with latest nodejs from nixos-23.11 (also 9.8.1)13:28:43
@niko:conduit.rsnyanbinaryHow come pnpm doesnt have tooling yet?15:20:26
@niko:conduit.rsnyanbinaryBun tooling would be really nice too lol15:20:32
@lily:lily.flowersLily Fosterthere's no blockers besides someone actually doing it15:20:52
@c0ba1t:matrix.orgCobalt\* not just doing it once though, maintaining any new build tool(s) is also required to be done by someone (else).15:23:29
@c0ba1t:matrix.orgCobalt* \* not just doing it once though, maintaining any new build tool(s) is also required to be done by someone (else, possibly).15:23:46
@niko:conduit.rsnyanbinaryhttps://github.com/NixOS/nixpkgs/pull/26577115:46:37
@niko:conduit.rsnyanbinarynightmare blunt pr15:46:40
@niko:conduit.rsnyanbinaryit still doesnt build 😭so if anyone wants to help haha15:47:01
15 Jan 2024
@kstiehl:matrix.numericas.de@kstiehl:matrix.numericas.de joined the room.14:41:10
@kstiehl:matrix.numericas.de@kstiehl:matrix.numericas.de

Hi guys,
I am currently trying to update an existing package which includes a yarn build.
But i get the following error message


Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:64:9)
    at Object.<anonymous> (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:73:48)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
  [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
  Require stack:
  - /nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
      at Module._load (node:internal/modules/cjs/loader:922:27)
      at Module.require (node:internal/modules/cjs/loader:1143:19)
      at require (node:internal/modules/cjs/helpers:119:18)
      at requireWithFriendlyError (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:62:10)
      at Object.<anonymous> (/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js:73:48)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      '/nix/store/dh3qisz023vmmhqxdr4hdcva0syjmc4i-woodpecker-ci-modules-2.1.1/node_modules/rollup/dist/native.js'
    ]
  }
}

I can see that the package was actually downloaded. But it does not seem to present in the build step.

14:51:06
@lily:lily.flowersLily Fostercan you share the derivation?14:52:23
@kstiehl:matrix.numericas.de@kstiehl:matrix.numericas.dehttps://github.com/NixOS/nixpkgs/blob/23.11/pkgs/development/tools/continuous-integration/woodpecker/frontend.nix I am trying to update the woodpecker package. And it fails in the frontend derivation. 14:57:46
@lily:lily.flowersLily Fosterah, can you share your updated derivation too? i'll try to look sometime today if no one else is able to help before i'm at my computer again14:58:23
@kstiehl:matrix.numericas.de@kstiehl:matrix.numericas.degimme a sec I'll create a fork of the repo real quick with my changes included14:59:50
@kstiehl:matrix.numericas.de@kstiehl:matrix.numericas.de

https://github.com/kstiehl/nixpkgs/blob/update/woodpecker/pkgs/development/tools/continuous-integration/woodpecker/frontend.nix

Lily Foster Sorry took a bit longer. I made sure that it is actually reproducible, and during that my VM run out of disk space. However Here it is :)

15:48:46
17 Jan 2024
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deIs there a reason we don't have a way of specifying the package-lock.json without a hash? We can do this with cargo as well and to me it looks like we can fromJSON the package lock and get the URLs and SRI hashes from it09:46:35
@c0ba1t:matrix.orgCobaltMy best guess would be that it just hasn't been implemented (yet).12:37:14
@c0ba1t:matrix.orgCobalt Lily Foster: iirc, mentioned working on something similar. 12:37:52
@lily:lily.flowersLily Foster yep, Cobalt is correct 13:06:17
@lily:lily.flowersLily Fosteri'm working on lockfile fixup refactoring because lockfiles are, uh, a bit too busted a bit too often and also we need to inject git dep hashes anyway so it'll be able to do overrides to solve the problem of busted lockfiles without having to regenerate and vendor lockfiles13:07:13
@lily:lily.flowersLily Foster (my use-case is still mostly nixpkgs-focused here, but it will greatly benefit out-of-tree modules with the importNpmLock functionality) 13:07:50
@kstiehl:matrix.numericas.de@kstiehl:matrix.numericas.de
In reply to @lily:lily.flowers
ah, can you share your updated derivation too? i'll try to look sometime today if no one else is able to help before i'm at my computer again
Lily Foster: hi did you find the time to have a look? If not that's fine too. Just want to know whether i should keep my hopes up😅
16:28:07
@h7x4:nani.wtfh7x4

Hello. I'm having some trouble with the lockfile fixup stage of npm-config-hook

One of the dependencies are listed as git+https://git.sr.ht/~cadence/nodejs-discord-markdown#abc56d544072a1dc5624adfea455b0e902adf7b3, which successfully gets rewritten to https://git.sr.ht/~cadence/nodejs-discord-markdown/archive/abc56d544072a1dc5624adfea455b0e902adf7b3.tar.gz during the cache creation stage, and written to package.metadata.url. But during the lockfile fixup it can't retrieve the hash, seemingly because it tries to match up the first untouched URL with the second rewritten one.

Since we're doing this kind of rewriting for all kinds of URLs, I'm wondering whether I've misunderstood something? Is there some kind of mechanism in place for the other URLs to ensure we're able to look them up from the cache after rewriting their URLs?

19:08:56
@dandellion:dodsorf.asDandellionFor added context this is the same package as we previously talked about in https://matrix.to/#/!NhAsaYbbgmzHtXTPQJ:funklause.de/$dTuHZBRPJkPGn0WSjuBWwhnp1IiEt9yqDbkCA7uXXpU?via=nixos.org&via=matrix.org&via=nixos.dev19:19:12
@lily:lily.flowersLily Foster
In reply to @kstiehl:matrix.numericas.de
Lily Foster: hi did you find the time to have a look? If not that's fine too. Just want to know whether i should keep my hopes up😅
i've not had time, sorry :(
23:15:48
@lily:lily.flowersLily Foster
In reply to @h7x4:nani.wtf

Hello. I'm having some trouble with the lockfile fixup stage of npm-config-hook

One of the dependencies are listed as git+https://git.sr.ht/~cadence/nodejs-discord-markdown#abc56d544072a1dc5624adfea455b0e902adf7b3, which successfully gets rewritten to https://git.sr.ht/~cadence/nodejs-discord-markdown/archive/abc56d544072a1dc5624adfea455b0e902adf7b3.tar.gz during the cache creation stage, and written to package.metadata.url. But during the lockfile fixup it can't retrieve the hash, seemingly because it tries to match up the first untouched URL with the second rewritten one.

Since we're doing this kind of rewriting for all kinds of URLs, I'm wondering whether I've misunderstood something? Is there some kind of mechanism in place for the other URLs to ensure we're able to look them up from the cache after rewriting their URLs?

it's a bug. i've found it and am about to submit a PR in a few
23:19:03
@lily:lily.flowersLily Fostererr wait, no maybe i haven't found the bug. that didn't work. give me a few23:20:45

Show newer messages


Back to Room ListRoom Version: 6