!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

208 Members
60 Servers

Load older messages


SenderMessageTime
8 Nov 2023
@lily:lily.flowersLily FosterAwesome, glad that worked!16:29:21
@lily:lily.flowersLily FosterLet me know if you have other issues with it16:29:27
9 Nov 2023
@wisw:im.skytel.eewisw joined the room.14:27:08
@szucsitg:matrix.orgszucsitg

I am trying to build a frontend with mkYarnPackage but it fails on download for this lockfile

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"duo_web_sdk@https://github.com/duosecurity/duo_web_sdk#v2.9":
  version "2.7.0"
  resolved "https://github.com/duosecurity/duo_web_sdk#378e855ce4a1de1d1b2f7fd60465e564b3e9fbda"

The error is:

error: hash mismatch in fixed-output derivation '/nix/store/yxmkgwcrvzfmhhxjqkrcnd49fr8fv1bi-duosecurity_duo_web_sdk.drv':
         specified: sha1-N46FXOSh3h0bL3/WBGXlZLPp+9o=
            got:    sha1-DbsHW3BaLQrtZoh0x5znwdK9xAc=

I'm not sure why the hash doesn't align

15:29:00
@c0ba1t:matrix.orgCobaltThat looks interesting, Have you tried to refresh the npmDeps Hash?15:34:42
@szucsitg:matrix.orgszucsitg I'm not defining it's just:
mkYarnPackage {
name = "node-modules";
src=./.;
}
15:40:15
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org

I am trying to build a frontend with mkYarnPackage but it fails on download for this lockfile

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"duo_web_sdk@https://github.com/duosecurity/duo_web_sdk#v2.9":
  version "2.7.0"
  resolved "https://github.com/duosecurity/duo_web_sdk#378e855ce4a1de1d1b2f7fd60465e564b3e9fbda"

The error is:

error: hash mismatch in fixed-output derivation '/nix/store/yxmkgwcrvzfmhhxjqkrcnd49fr8fv1bi-duosecurity_duo_web_sdk.drv':
         specified: sha1-N46FXOSh3h0bL3/WBGXlZLPp+9o=
            got:    sha1-DbsHW3BaLQrtZoh0x5znwdK9xAc=

I'm not sure why the hash doesn't align

what is the hash in the lockfile? it's not in your snippet
15:43:29
@szucsitg:matrix.orgszucsitgIf you start a new yarn project it's getting added like this 🤷15:45:33
@lily:lily.flowersLily FosterIs that the entire file?15:46:13
@szucsitg:matrix.orgszucsitgYes, that's my full test repo lock file. The original project has like 3k deps, I'm trying to isolate the issue15:47:05
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I'm not defining it's just:
mkYarnPackage {
name = "node-modules";
src=./.;
}
And this is your entire derivation?
15:47:56
@szucsitg:matrix.orgszucsitg No, it's not. But it doesn't get to mkDerivation that would depend on the node-modules 15:48:57
@szucsitg:matrix.orgszucsitgI can upload the sample if that would help15:52:44
@szucsitg:matrix.orgszucsitgThe funny thing I get a different hash in my test project than in my original for the very same lines in the lockfile15:53:34
@szucsitg:matrix.orgszucsitg Actually it's keeps changing as I scroll back 15:54:25
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I can upload the sample if that would help
yeah that probably would help. i'm trying to figure out where that hash is coming from at all
15:56:38
@szucsitg:matrix.orgszucsitghttps://gist.github.com/szucsitg/70fe7ca82c51d30208595cd04b8bd7c516:05:24
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
https://gist.github.com/szucsitg/70fe7ca82c51d30208595cd04b8bd7c5
I may not be understanding something, but why would you have a separate node-modules derivation here and then just use stdenv.mkDerivation to build what is a yarn package?
16:07:34
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
https://gist.github.com/szucsitg/70fe7ca82c51d30208595cd04b8bd7c5
* I may not be understanding something, but why would you have a separate node-modules derivation here and then just using stdenv.mkDerivation to build what is a yarn package?
16:07:40
@szucsitg:matrix.orgszucsitgMaybe my pattern is completely off, but there's not much documentation around mkYarnPackage. Also ultimately due to the project structure we install packages in root, then build in a subfolder 3 levels down16:09:51
@szucsitg:matrix.orgszucsitgSo I thought this way I have fight less with nix patterns at the end16:10:23
@lily:lily.flowersLily Foster mkYarnPackage is designed to build yarn packages, and the fact that it makes a node_modules folder at all is just a byproduct of that. I feel like you'll have an easier time without that indirect, especially since running yarn plain like you are now won't actually work without the setup stuff that mkYarnPackage does 16:11:38
@lily:lily.flowersLily Foster * mkYarnPackage is designed to build yarn packages, and the fact that it makes a node_modules folder at all is just a byproduct of that. I feel like you'll have an easier time without that indirection, especially since running yarn plain like you are now won't actually work without the setup stuff that mkYarnPackage does 16:11:47
@lily:lily.flowersLily Fosterstill isn't gonna fix the error you came in here for though16:12:34
@lily:lily.flowersLily Fosteri'm looking into that16:12:36
@lily:lily.flowersLily Foster I'm assuming you must have IFD on, since you didn't add a yarn.nix? 16:14:42
@lily:lily.flowersLily FosterHmmm16:14:55
@szucsitg:matrix.orgszucsitg I'm happy to learn from people with more experience, what would be a better approach. I'm trying to implement nix for a while for our builds, until a few months ago, I always got stuck, but now I'm inching very close to have most stuff covered 16:15:18
@szucsitg:matrix.orgszucsitgWhat is IFD?16:15:25
@lily:lily.flowersLily Fosterhttps://nixos.org/manual/nix/unstable/language/import-from-derivation16:16:08

Show newer messages


Back to Room ListRoom Version: 6