!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

205 Members
59 Servers

Load older messages


SenderMessageTime
12 Nov 2023
@lily:lily.flowersLily Fosterbecause yeah, no that looks like it should work now13:33:29
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
What's in /nix/store/xixmhd827wd95j6748xv3zyn5cf3kb9x-build-my-application? should just be the build dir with index.js, right?
yep there is everything in there that is also there if I test it locally and run node .
13:33:51
@peter-lustig:matrix.orgpeter-lustigso idk why it is not working13:33:54
@peter-lustig:matrix.orgpeter-lustig ok Lily Foster so i think i found the culprit 13:34:33
@peter-lustig:matrix.orgpeter-lustig when I do cd that path and then node . 13:34:39
@peter-lustig:matrix.orgpeter-lustigthis comes13:34:42
@peter-lustig:matrix.orgpeter-lustigimage.png
Download image.png
13:35:12
@peter-lustig:matrix.orgpeter-lustig but this only comes when I use nix to run the build stuff, not when I just do npm run build on my own Lily Foster 13:35:43
@lily:lily.flowersLily Fosterthat's just a warning, right? are there more messages?13:35:45
@lily:lily.flowersLily Foster what happens if you do /nix/store/17g2kfxglsl3rncfasqrxqs2g3bjin3k-nodejs-20.9.0/bin/node . from that dir? 13:35:59
@peter-lustig:matrix.orgpeter-lustigimage.png
Download image.png
13:36:08
@lily:lily.flowersLily Fosteruhhh13:36:29
@lily:lily.flowersLily Fostersyntax error...?13:36:35
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
uhhh
note this does not happen when I do not do it with nix
13:36:44
@peter-lustig:matrix.orgpeter-lustigwhen I just do npm run build locally13:36:51
@peter-lustig:matrix.orgpeter-lustigso it is not my applications fault13:36:57
@lily:lily.flowersLily Foster but wait does node . fail similarly? 13:37:04
@peter-lustig:matrix.orgpeter-lustig the errors I sent come from cd /nix/store/... and then running node . 13:37:29
@peter-lustig:matrix.orgpeter-lustig but when I build locally with npm run build, then cd buildand run node ., everything just works 13:37:44
@lily:lily.flowersLily Fosteryeah then you're build dir that you made in your derivation is busted13:37:45
@lily:lily.flowersLily Foster * yeah then your build dir that you made in your derivation is busted13:37:52
@lily:lily.flowersLily Fosterhmmm13:37:55
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
but when I build locally with npm run build, then cd buildand run node ., everything just works
can you share your derivation that you used to make the build dir?
13:38:08
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
can you share your derivation that you used to make the build dir?
yes
13:38:15
@peter-lustig:matrix.orgpeter-lustig
devShells.${system}.default = pkgs.mkShell {
      buildInputs = with pkgs; [
        nodejs_20
      ];
    };
    packages.${system}.default = pkgs.buildNpmPackage {
      name = "build-my-application";
      src = ./.;
      npmDepsHash = "sha256-mTpjBKTIJkYVj2jrH5lF/n3Axceak4L60ZDQECQhGew=";
      installPhase = ''
        mkdir $out
        cp -r build/* $out
      '';
    };
13:38:51
@peter-lustig:matrix.orgpeter-lustigthere has to be some mistake in here that I did or something missing13:39:53
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
devShells.${system}.default = pkgs.mkShell {
      buildInputs = with pkgs; [
        nodejs_20
      ];
    };
    packages.${system}.default = pkgs.buildNpmPackage {
      name = "build-my-application";
      src = ./.;
      npmDepsHash = "sha256-mTpjBKTIJkYVj2jrH5lF/n3Axceak4L60ZDQECQhGew=";
      installPhase = ''
        mkdir $out
        cp -r build/* $out
      '';
    };
what if you just installPhase = "cp -r build $out" instead of the mkdir and stuff?
13:40:08
@szucsitg:matrix.orgszucsitg
In reply to @lily:lily.flowers
So I was meaning the actual like workspaces field in package.json
We use that in package.json but I already struggled with that a little bit because not all of the folders within a workspace subfolder has package.json. And this is what I added to mkYarnPackage derivation. Each of them as mkYarnPackage
13:41:13
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
what if you just installPhase = "cp -r build $out" instead of the mkdir and stuff?
same error
13:41:23
@lily:lily.flowersLily Foster can you diff -r build /nix/store/xixmhd827wd95j6748xv3zyn5cf3kb9x-build-my-application from your local build? 13:41:53

Show newer messages


Back to Room ListRoom Version: 6