| 22 Nov 2023 |
Wanja Hentze | yes, v1 is shit | 16:53:59 |
Wanja Hentze | npmlock2nix only barely supports v2 and does not support v3 at all | 16:54:25 |
Lily Foster | idk i'd rather work on pnpm stuff at this point, but that's because the more i look into it, the more actually sane it looks (yaml lockfiles aside) | 16:54:45 |
Wanja Hentze | I think it's dead or dying now because of this | 16:54:45 |
Wanja Hentze | well, my usecase is packaging already existing stuff. and that stuff usually has package.json and package-lock.json | 16:55:24 |
Wanja Hentze | if yarn or pnpm can work with those, then sure why not | 16:55:57 |
hexa | what prevents projects from moving from a yarn v1 to a v2 lockfile? | 19:51:18 |
hexa | at the moment I feel like yarn projects are at risk in nixpkgs | 19:52:01 |
teto | I packaged a custom package with buildNpmPackage and the package.json has a main entry.
➜ result/bin/jkops --help
Error: Cannot find module '/nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:438:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Function.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 Object.<anonymous> (/nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-crypto/util/src/convertToBuffer.ts:5:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
the first path /nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js does not exist in nix store but /nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-sdk/util-utf8-browser/package.json does . It contains a line "main": "./dist-cjs/index.js"which is the non-existing file in the store. Is that a nix side effect or is this normal in the npm world ? (still discovering)
| 22:34:22 |
Lily Foster | In reply to @keiichi:matrix.org
I packaged a custom package with buildNpmPackage and the package.json has a main entry.
➜ result/bin/jkops --help
Error: Cannot find module '/nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:438:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Function.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 Object.<anonymous> (/nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-crypto/util/src/convertToBuffer.ts:5:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
the first path /nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js does not exist in nix store but /nix/store/9x13vrsbm8rb78x8mhrcb72ysza14llz-jkops-1.0.0/lib/node_modules/jkops/node_modules/@aws-sdk/util-utf8-browser/package.json does . It contains a line "main": "./dist-cjs/index.js"which is the non-existing file in the store. Is that a nix side effect or is this normal in the npm world ? (still discovering)
can you share derivation? | 22:35:24 |
Lily Foster | something's probably not getting built and i would like to find out if it's because of our npm hell or npm's own hell | 22:35:45 |
teto | Is it ok to share privately ? I dont think there is anything funny but just in case | 22:36:57 |
teto | * Is it ok to share privately ? I dont think there is anything sensitive but just in case | 22:37:16 |
Lily Foster | In reply to @keiichi:matrix.org Is it ok to share privately ? I dont think there is anything sensitive but just in case yep! feel free to PM me on matrix or otherwise share privately | 22:37:46 |
hexa | In reply to @hexa:lossy.network at the moment I feel like yarn projects are at risk in nixpkgs the reason I'm asking is mjolnir/draupnir, who both use yarn v1 lock files right now and are critical for the moderation team | 23:26:43 |
Lily Foster | In reply to @hexa:lossy.network the reason I'm asking is mjolnir/draupnir, who both use yarn v1 lock files right now and are critical for the moderation team i agree they're at risk. my mental bandwidth has really been not great though, and no one has really stepped up about yarn-berry support :( | 23:27:47 |
hexa | the worst case would be to stick them in a $DOCKER container and we'be okay | 23:28:34 |
hexa | and don't worry about your personal bandwidth in that case | 23:28:50 |
hexa | it is what it is | 23:28:52 |
hexa | either some does it or not, but it is never any individuals fault | 23:28:59 |
| 23 Nov 2023 |
@adis:blad.is | In reply to @lily:lily.flowers idk i'd rather work on pnpm stuff at this point, but that's because the more i look into it, the more actually sane it looks (yaml lockfiles aside) What do you want to do with pnpm? I looked into it quite a bit a few years back. | 00:55:45 |
@adis:blad.is | In reply to @whentze:matrix.org
so atm I have 2 questions adisbladis
- if I cleaned up the code to parse
.npmrc and pass auth headers based on it into fetchurl, would you be willing to take it?
- is
src != packageRoot supposed to work, or is it an unsupported configuration?
Is this something that would be possible to add to fetchurl or a custom fetcher? | 00:57:16 |
@adis:blad.is | In reply to @whentze:matrix.org the src/sourceRoot/npmRoot/packageRoot situation is quite confusing to me. no combination I've tried seems to work. Yeah.. Perhaphs I should rename packageRoot -> npmRoot | 00:57:44 |
@adis:blad.is | They're the same thing | 00:57:47 |
@adis:blad.is | It just felt more symmetric with package/packageJson/packageRoot | 00:58:09 |
@adis:blad.is | In reply to @hexa:lossy.network the reason I'm asking is mjolnir/draupnir, who both use yarn v1 lock files right now and are critical for the moderation team I'm probably missing something, but is there a reason upstream hasn't switched? Could we ask them to? | 01:00:07 |
Wanja Hentze | In reply to @adis:blad.is Is this something that would be possible to add to fetchurl or a custom fetcher? yes | 01:01:00 |
hexa | In reply to @adis:blad.is I'm probably missing something, but is there a reason upstream hasn't switched? Could we ask them to? switching to v2 locks would be problematic, as we lack the tooling to package them rn | 01:01:20 |
hexa | we don't want them to switch at this time 🙂 | 01:01:30 |
Wanja Hentze | In reply to @adis:blad.is They're the same thing but the nix file expects packageRoot whereas the hook excepts npmRoot | 01:01:36 |