!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

206 Members
59 Servers

Load older messages


SenderMessageTime
8 Nov 2023
@szucsitg:matrix.orgszucsitgI added RUST_LOG envvar to the flake globally but didn't change the output of the logs at all...15:55:00
@szucsitg:matrix.orgszucsitg verb argv "ci" "--ignore-scripts" "--logs-dir" "$HOME" "--loglevel" "verbose" "--legacy-peer-deps"
npm verb logfile logs-max:10 dir:/private/tmp/nix-build-enterpise-fe-1.0.0.drv-0/43vw5pdp546dz14fkdzs3mvrkgx78b0x-source/$HOME/2023-11-08T15_26_25_613Z-
npm verb logfile /private/tmp/nix-build-enterpise-fe-1.0.0.drv-0/43vw5pdp546dz14fkdzs3mvrkgx78b0x-source/$HOME/2023-11-08T15_26_25_613Z-debug-0.log
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm WARN tarball cached data for @xlts.dev/angular@https://registry.xlts.dev/@xlts.dev/angular/-/angular-1.9.3.tgz (sha512-0LPHXw0wcBKXag3HXq6NQICkgogUeWnKyYJZuBHmw/bBQ0ySwc5Z2cy7sgY2B8yyvN5heYVF5v8EdspABwwQ0w==) seems to be corrupted. Refreshing cache
npm WARN ...
npm WARN tarball tarball data for @xlts.dev/angular@https://registry.xlts.dev/@xlts.dev/angular/-/angular-1.9.3.tgz (sha512-0LPHXw0wcBKXag3HXq6NQICkgogUeWnKyYJZuBHmw/bBQ0ySwc5Z2cy7sgY2B8yyvN5heYVF5v8EdspABwwQw==) seems to be corrupted. Trying again.
npm WARN ...
npm verb stack Error: request to https://registry.xlts.dev/@xlts.dev/angular/-/angular-1.9.3.tgz failed: cache mode is 'only-if-cached' but no cached response is available.
npm verb stack at cacheFetch (/nix/store/fwgfw6i5q1hv49bgfl96bmzv72l98khy-nodejs-18.18.2/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:12:13)
npm verb stack at async fetch (/nix/store/fwgfw6i5q1hv49bgfl96bmzv72l98khy-nodejs-18.18.2/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7)
npm verb cwd /private/tmp/nix-build-enterpise-fe-1.0.0.drv-0/vjwq323qvid100wrhzm7r65vg77g9fkr-source
npm verb Darwin 22.6.0
npm verb node v18.18.2
npm verb npm v9.8.1
npm ERR! code ENOTCACHED
npm ERR! request to https://registry.xlts.dev/@xlts.dev/angular/-/angular-1.9.3.tgz failed: cache mode is 'only-if-cached' but no cached response is available.
npm verb exit 1
npm verb unfinished npm timer reify 1699458585475
npm verb unfinished npm timer reify:unpack 1699458585632
npm verb unfinished npm timer reifyNode:node_modules/@xlts.dev/angular 1699458585646
npm verb code 1
15:55:16
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I added RUST_LOG envvar to the flake globally but didn't change the output of the logs at all...
i'm not sure where "flake globally" would be given there is no globals for flakes (much less for env vars). but also that would only affect the fetcher and your log is post-fetcher
15:58:52
@lily:lily.flowersLily Foster Can you find the store path for npmDeps on your derivation and check the contents of /nix/store/.../_cacache/content-v2/sha512/d0/b3/c75f0d307012976a0dc75eae8d4080a48288147969cac98259b811e6c3f6c1434c92c1ce59d9ccbbb2063607ccb2bcde61798545e6ff0476ca40070c10d3? 15:59:11
@lily:lily.flowersLily Foster(i would fill in the store path for you, but you didn't provide full logs so i don't have it)15:59:48
@szucsitg:matrix.orgszucsitg I also read it back, that it should be added to the daemon, but I don't really want that, so I tried pre and postpatch hooks, but it didn't work, so I added to the flake as env.NIX_NPM_TOKENS 16:00:02
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I also read it back, that it should be added to the daemon, but I don't really want that, so I tried pre and postpatch hooks, but it didn't work, so I added to the flake as env.NIX_NPM_TOKENS
You can sorta add it there, just be aware that it will leak the secrets to the nix store like that
16:00:43
@lily:lily.flowersLily Foster(and nix store is world-readable by all local users)16:00:56
@szucsitg:matrix.orgszucsitg Yeah, thanks for the reminder, I'm aware of the downside, it's not critical to keep it as a secret as it's read-only. However now I know why it didn't work. Because it couldn't download it. {"error": "authorization required to access package @xlts.dev/angular"} 16:05:08
@szucsitg:matrix.orgszucsitgAlso I'm not sure how did you know the path 🤔16:05:27
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
Also I'm not sure how did you know the path 🤔
The error message had the hash, so i converted it to hex and i know how the cacache paths work
16:05:49
@lily:lily.flowersLily Foster(i maintain the fetcher code that puts together that cache for npm)16:06:05
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I also read it back, that it should be added to the daemon, but I don't really want that, so I tried pre and postpatch hooks, but it didn't work, so I added to the flake as env.NIX_NPM_TOKENS
can you share a (redacted) example of what you are putting in it?
16:06:30
@szucsitg:matrix.orgszucsitgI tried to debug my setup with printenv in postpatch hook but envvar is set in the shell, maybe my format is off?!16:06:31
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I also read it back, that it should be added to the daemon, but I don't really want that, so I tried pre and postpatch hooks, but it didn't work, so I added to the flake as env.NIX_NPM_TOKENS
* can you share a (redacted) example of what you are putting in the env var?
16:06:34
@szucsitg:matrix.orgszucsitg This is within buildNpmPackage derivation env.NIX_NPM_TOKENS=''{"http://registry.xlts.dev":"eyJ...."}''; 16:10:07
@lily:lily.flowersLily Fosterah, it should be a hostname16:14:29
@lily:lily.flowersLily Foster just {"registry.xlts.dev":"eyJ..."} 16:14:38
@szucsitg:matrix.orgszucsitg Actually it is just the host name, I guess the pasting screwed up 16:18:24
@lily:lily.flowersLily Foster Here's a wild shot in the dark -- did you invalidate the npmDepsHash and try to rebuild after adding the NIX_NPM_TOKENS? 16:18:58
@lily:lily.flowersLily Foster Also that env.NIX_NPM_TOKENS is on the fetcher derivation, right? 16:19:09
@lily:lily.flowersLily Foster (not buildNpmPackage) 16:19:15
@szucsitg:matrix.orgszucsitgI invalidated the hash, but I'm not sure how could I override the fetcher16:19:44
@lily:lily.flowersLily Foster so you could add your own npmDepsHash 16:20:21
@lily:lily.flowersLily Foster But I think you could hack it in postPatch 16:20:29
@lily:lily.flowersLily Foster like postPatch = "export NIX_NPM_TOKENS=..."; on buildNpmPackage because that gets inherited into the fetcher 16:20:42
@lily:lily.flowersLily Foster (env does not) 16:20:46
@lily:lily.flowersLily Foster * so you could add your own npmDeps 16:25:32
@szucsitg:matrix.orgszucsitgI first tried the postpatch but eval failed on it, I just realized I used the wrong quote in export 🤦‍♂16:27:02
@szucsitg:matrix.orgszucsitgThanks for helping me out, this did the trick16:27:19

Show newer messages


Back to Room ListRoom Version: 6