!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

194 Members
56 Servers

Load older messages


SenderMessageTime
17 Jan 2024
@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
@h7x4:nani.wtfh7x4No worries 😄 Ping me if you'd like the package file with the current failing setup.23:23:45
@lily:lily.flowersLily Foster
In reply to @h7x4:nani.wtf
No worries 😄 Ping me if you'd like the package file with the current failing setup.
sure, i made my own super quickly but that would probably help too
23:25:48
@lily:lily.flowersLily Fosteri'm starting to wonder if this is just an npm bug? at least in my reproducer, it has nothing to do with lockfile fixup afaict23:30:04
@lily:lily.flowersLily Fosternpm says "tarball data seems to be corrupted" even though hash matches and the tarball seems valid 🤔23:30:38
@h7x4:nani.wtfh7x4

I've bundled a patch, likely introducing IFD, but good enough for testing.

{ lib
, buildNpmPackage
, fetchNpmDeps
, fetchFromGitea
, git
, cacert

, writeText
}:
# Smaller version of the problem
# fetchNpmDeps {
#   name = "out-of-your-element-deps";
#   src = fetchFromGitea {
#     domain = "gitdab.com";
#     owner = "cadence";
#     repo = "out-of-your-element";
#     rev = "v1.3";
#     hash = "sha256-dLDm3xOMoprkGU7D9IFX1hjMfCR3YjVgXb3c5IEuUTQ";
#   };

#   patches = [ ./add-discord-markdown-dep-integrity.patch ];

  # npmDepsHash = "sha256-k2MeejRWteIzY1Q+iNLCLDLnE1z9+cBaAGYAIlQHa/4=";
# };
buildNpmPackage rec {
  pname = "out-of-your-element";
  version = "1.3";
  src = fetchFromGitea {
    domain = "gitdab.com";
    owner = "cadence";
    repo = "out-of-your-element";
    rev = "v${version}";
    hash = "sha256-dLDm3xOMoprkGU7D9IFX1hjMfCR3YjVgXb3c5IEuUTQ";
  };

  patches = [ (writeText "add-discord-markdown-dep-integrity.patch" ''
    diff --git i/package-lock.json w/package-lock.json
    index 3847ee1..79a3ac0 100644
    --- i/package-lock.json
    +++ w/package-lock.json
    @@ -1060,6 +1060,7 @@
         "node_modules/discord-markdown": {
           "version": "2.4.1",
           "resolved": "git+https://git.sr.ht/~cadence/nodejs-discord-markdown#abc56d544072a1dc5624adfea455b0e902adf7b3",
    +      "integrity": "sha512-mPjPXXNgL3prKagvj/guOzAEMcJdcr6S95u7MRlYZvsgeUiacQDQatYrJgYAf53vJw+U0JvEPUwRHZY02oX1og==",
           "license": "MIT",
           "dependencies": {
             "simple-markdown": "^0.7.2"
  '') ];

  dontNpmBuild = true;
  npmDepsHash = "sha256-fPTFyX2GYSdMeIzVKXBacZxhTTj8fvlMFEGOxN0/cm8=";

  meta = with lib; {
    homepage = "https://gitdab.com/cadence/out-of-your-element";
    description = "Modern Matrix-to-Discord appservice bridge";
    changelog = "https://gitdab.com/cadence/out-of-your-element/releases/tag/${src.rev}";
    license = licenses.agpl3Plus;
    mainProgram = "start.js";
  };
}
23:34:11
@lily:lily.flowersLily Fostergods i wish npm's debug logging wasn't so slim and convenient not say where or why the error actually happened...23:57:46
@lily:lily.flowersLily Foster * gods i wish npm's debug logging wasn't so slim and not say where or why the error actually happened...23:57:55
18 Jan 2024
@syntheit:matrix.org@syntheit:matrix.org left the room.04:14:31
19 Jan 2024
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (meticulous montesquieu) to hopland (manners or stfu).05:12:19
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland (manners or stfu) to hopland.05:14:42
22 Jan 2024
@szucsitg:matrix.orgszucsitgWhat is the right way to not copy node_modules into lib folder with buildNpmPackage? As it's a static frontend code it doesn't need that folder at all09:37:28
@szucsitg:matrix.orgszucsitg Ah, I guess I should have just added dontInstall = true 😅 09:51:24
@marie:marie.cologneMarieyou could also set installPhase for copying the build output to $out10:36:20
@ThorHop:matrix.org@ThorHop:matrix.org changed their display name from hopland to IdeallyYes.15:06:40
29 Jan 2024
@hexa:lossy.networkhexaRedacted or Malformed Event22:31:06
@hexa:lossy.networkhexafetchNpmDeps chokes on fetching cryptpad things 😄 22:31:33
@hexa:lossy.networkhexa this looks an issue avocadoom solved by exporting HOME, but since it happens in the fetcher for me....? 22:32:00
@hexa:lossy.networkhexa * this looks an issue avocadoom solved by exporting HOME 22:37:19
@hexa:lossy.networkhexa * fetchNpmDeps chokes on cryptpad things 😄 22:37:43
@hexa:lossy.networkhexa * buildNpmPackage chokes on cryptpad things 😄 22:37:49
@hexa:lossy.networkhexabut doing that doesn't help 🙂22:44:13
@hexa:lossy.networkhexa
cryptpad> Installing dependencies
cryptpad> ++ npm ci --ignore-scripts --loglevel=verbose
cryptpad> npm verb cli /nix/store/d6lkbndr98lcn8spbqxfq52f2ldvqhks-nodejs-20.11.0/bin/node /nix/store/d6lkbndr98lcn8spbqxfq52f2ldvqhks-nodejs-20.11.0/bin/npm
cryptpad> npm info using npm@10.2.4
cryptpad> npm info using node@v20.11.0
cryptpad> npm verb logfile could not create logs-dir: Error: EACCES: permission denied, mkdir '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs'
cryptpad> npm verb title npm ci
cryptpad> npm verb argv "ci" "--ignore-scripts" "--loglevel" "verbose"
cryptpad> npm verb logfile logs-max:10 dir:/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs/2024-01-29T22_44_13_405Z-
cryptpad> npm verb logfile could not be created: Error: ENOENT: no such file or directory, open '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs/2024-01-29T22_44_13_405Z-debug-0.log'
cryptpad> npm verb logfile no logfile created
cryptpad> npm WARN EBADENGINE Unsupported engine {
cryptpad> npm WARN EBADENGINE   package: 'json.sortify@2.2.2',
cryptpad> npm WARN EBADENGINE   required: { node: '>=4.0.0', npm: '~1.0.20' },
cryptpad> npm WARN EBADENGINE   current: { node: 'v20.11.0', npm: '10.2.4' }
cryptpad> npm WARN EBADENGINE }
cryptpad> npm WARN deprecated debuglog@0.0.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
cryptpad> npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
cryptpad> npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
cryptpad> npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
cryptpad> npm WARN deprecated lex@1.7.9: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
cryptpad> npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
cryptpad> npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
cryptpad> npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
cryptpad> npm verb stack Error: EACCES: permission denied, mkdir '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_cacache/tmp'
cryptpad> npm verb cwd /build/source
cryptpad> npm verb Linux 6.1.69
cryptpad> npm verb node v20.11.0
cryptpad> npm verb npm  v10.2.4
cryptpad> npm ERR! code EACCES
cryptpad> npm ERR! syscall mkdir
cryptpad> npm ERR! path /nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_cacache/tmp
cryptpad> npm ERR! errno -13
cryptpad> npm verb Error: EACCES: permission denied, mkdir '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_cacache/tmp' 
cryptpad> npm ERR! 
cryptpad> npm ERR! Your cache folder contains root-owned files, due to a bug in
cryptpad> npm ERR! previous versions of npm which has since been addressed.
cryptpad> npm ERR! 
cryptpad> npm ERR! To permanently fix this problem, please run:
cryptpad> npm ERR!   sudo chown -R 1000:100 "/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps"
cryptpad> npm verb exit -13
cryptpad> npm verb unfinished npm timer reify 1706568253643
cryptpad> npm verb unfinished npm timer reify:unpack 1706568253668
cryptpad> npm verb unfinished npm timer reifyNode:node_modules/drawio 1706568253673
cryptpad> npm verb code -13
cryptpad> 
cryptpad> npm ERR! Log files were not written due to an error writing to the directory: /nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs
cryptpad> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
cryptpad> ++ echo
22:44:44
@lily:lily.flowersLily Foster
In reply to @hexa:lossy.network
cryptpad> Installing dependencies
cryptpad> ++ npm ci --ignore-scripts --loglevel=verbose
cryptpad> npm verb cli /nix/store/d6lkbndr98lcn8spbqxfq52f2ldvqhks-nodejs-20.11.0/bin/node /nix/store/d6lkbndr98lcn8spbqxfq52f2ldvqhks-nodejs-20.11.0/bin/npm
cryptpad> npm info using npm@10.2.4
cryptpad> npm info using node@v20.11.0
cryptpad> npm verb logfile could not create logs-dir: Error: EACCES: permission denied, mkdir '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs'
cryptpad> npm verb title npm ci
cryptpad> npm verb argv "ci" "--ignore-scripts" "--loglevel" "verbose"
cryptpad> npm verb logfile logs-max:10 dir:/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs/2024-01-29T22_44_13_405Z-
cryptpad> npm verb logfile could not be created: Error: ENOENT: no such file or directory, open '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs/2024-01-29T22_44_13_405Z-debug-0.log'
cryptpad> npm verb logfile no logfile created
cryptpad> npm WARN EBADENGINE Unsupported engine {
cryptpad> npm WARN EBADENGINE   package: 'json.sortify@2.2.2',
cryptpad> npm WARN EBADENGINE   required: { node: '>=4.0.0', npm: '~1.0.20' },
cryptpad> npm WARN EBADENGINE   current: { node: 'v20.11.0', npm: '10.2.4' }
cryptpad> npm WARN EBADENGINE }
cryptpad> npm WARN deprecated debuglog@0.0.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
cryptpad> npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
cryptpad> npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
cryptpad> npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
cryptpad> npm WARN deprecated lex@1.7.9: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
cryptpad> npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
cryptpad> npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
cryptpad> npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
cryptpad> npm verb stack Error: EACCES: permission denied, mkdir '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_cacache/tmp'
cryptpad> npm verb cwd /build/source
cryptpad> npm verb Linux 6.1.69
cryptpad> npm verb node v20.11.0
cryptpad> npm verb npm  v10.2.4
cryptpad> npm ERR! code EACCES
cryptpad> npm ERR! syscall mkdir
cryptpad> npm ERR! path /nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_cacache/tmp
cryptpad> npm ERR! errno -13
cryptpad> npm verb Error: EACCES: permission denied, mkdir '/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_cacache/tmp' 
cryptpad> npm ERR! 
cryptpad> npm ERR! Your cache folder contains root-owned files, due to a bug in
cryptpad> npm ERR! previous versions of npm which has since been addressed.
cryptpad> npm ERR! 
cryptpad> npm ERR! To permanently fix this problem, please run:
cryptpad> npm ERR!   sudo chown -R 1000:100 "/nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps"
cryptpad> npm verb exit -13
cryptpad> npm verb unfinished npm timer reify 1706568253643
cryptpad> npm verb unfinished npm timer reify:unpack 1706568253668
cryptpad> npm verb unfinished npm timer reifyNode:node_modules/drawio 1706568253673
cryptpad> npm verb code -13
cryptpad> 
cryptpad> npm ERR! Log files were not written due to an error writing to the directory: /nix/store/48frifr851cd9xz2siwzz1dsqnlz757w-cryptpad-5.6.0-npm-deps/_logs
cryptpad> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
cryptpad> ++ echo
Does makeCacheWritable = true help?
22:47:00
@hexa:lossy.networkhexaindeed it does22:51:02

Show newer messages


Back to Room ListRoom Version: 6