!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

208 Members
59 Servers

Load older messages


SenderMessageTime
12 Nov 2023
@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
@peter-lustig:matrix.orgpeter-lustiggood idea13:42:29
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
can you diff -r build /nix/store/xixmhd827wd95j6748xv3zyn5cf3kb9x-build-my-application from your local build?
oh yesus huge chunk of code
13:43:07
@peter-lustig:matrix.orgpeter-lustigfor differences13:43:10
@peter-lustig:matrix.orgpeter-lustigsomething seems to be completely different about them13:43:50
@peter-lustig:matrix.orgpeter-lustig

do I maybe need to copy some additional stuff to $out Lily Foster ?

You will need the output directory, the project's package.json, and the production dependencies in node_modules to run the application. Production dependencies can be generated by copying the package.json and package-lock.json and then running npm ci --omit dev (you can skip this step if your app doesn't have any dependencies). You can then start your app with this command:

13:47:07
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
something seems to be completely different about them
could you share at least a high-level overview of the differences? i mean do they just look different entirely when you ls each of them?
13:48:02
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
could you share at least a high-level overview of the differences? i mean do they just look different entirely when you ls each of them?
nope, when I ls them they look exactly the same
13:48:47
@peter-lustig:matrix.orgpeter-lustigsame files13:48:49
@peter-lustig:matrix.orgpeter-lustigit is some internal stuff13:48:55
@lily:lily.flowersLily Fosterhow internal? like a few folders in or just the contents of the files themselves?13:50:14
@peter-lustig:matrix.orgpeter-lustigidk if this helps 13:50:38
@peter-lustig:matrix.orgpeter-lustigimage.png
Download image.png
13:50:42
@peter-lustig:matrix.orgpeter-lustig🤣13:50:56
@lily:lily.flowersLily Fosterwould you be open to zipping up both build dirs and sharing them?13:51:49
@lily:lily.flowersLily Foster(you can DM too if you'd prefer)13:51:54
@peter-lustig:matrix.orgpeter-lustig

I got this too lily:

Only in build/client/_app/immutable/chunks: forms.cf1911ba.js
Only in result/client/_app/immutable/chunks: forms.d9f21722.js
Only in result/client/_app/immutable/chunks: singletons.9d990b5a.js
Only in build/client/_app/immutable/chunks: singletons.b4bca23b.js
Only in build/client/_app/immutable/entry: app.4750e9ea.js
Only in result/client/_app/immutable/entry: app.938a9429.js
Only in build/client/_app/immutable/entry: start.012ef946.js
Only in result/client/_app/immutable/entry: start.57a6559d.js
Only in result/client/_app/immutable/nodes: 1.3dbec856.js
Only in build/client/_app/immutable/nodes: 1.a183e2f5.js
Only in result/client/_app/immutable/nodes: 2.82332dad.js
Only in build/client/_app/immutable/nodes: 2.f3b1cddb.js
Only in build/client/_app/immutable/nodes: 3.c6c27f87.js
Only in result/client/_app/immutable/nodes: 3.d277ae9c.js
diff -r result/client/_app/version.json build/client/_app/version.json
1c1
< {"version":"1699796447956"}
\ No newline at end of file
---
> {"version":"1699796544239"}
\ No newline at end of file
Only in build/server/chunks: 1-5e15ab9a.js
Only in build/server/chunks: 1-5e15ab9a.js.map
Only in result/server/chunks: 1-84840c62.js
Only in result/server/chunks: 1-84840c62.js.map
Only in build/server/chunks: 2-586dab3d.js
Only in build/server/chunks: 2-586dab3d.js.map
Only in result/server/chunks: 2-fa581f9c.js
Only in result/server/chunks: 2-fa581f9c.js.map
Only in result/server/chunks: 3-0b2c5c5b.js
Only in result/server/chunks: 3-0b2c5c5b.js.map
Only in build/server/chunks: 3-7f356425.js
Only in build/server/chunks: 3-7f356425.js.map
diff -r result/server/index.js build/server/index.js
13:52:14
@peter-lustig:matrix.orgpeter-lustigmaybe it is moer helpful13:52:18
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
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
just curious, how attached are you to yarn.... yarn2nix has nasty sharp edges and i've never actually used it with workspace packages tbh
13:52:27
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org

I got this too lily:

Only in build/client/_app/immutable/chunks: forms.cf1911ba.js
Only in result/client/_app/immutable/chunks: forms.d9f21722.js
Only in result/client/_app/immutable/chunks: singletons.9d990b5a.js
Only in build/client/_app/immutable/chunks: singletons.b4bca23b.js
Only in build/client/_app/immutable/entry: app.4750e9ea.js
Only in result/client/_app/immutable/entry: app.938a9429.js
Only in build/client/_app/immutable/entry: start.012ef946.js
Only in result/client/_app/immutable/entry: start.57a6559d.js
Only in result/client/_app/immutable/nodes: 1.3dbec856.js
Only in build/client/_app/immutable/nodes: 1.a183e2f5.js
Only in result/client/_app/immutable/nodes: 2.82332dad.js
Only in build/client/_app/immutable/nodes: 2.f3b1cddb.js
Only in build/client/_app/immutable/nodes: 3.c6c27f87.js
Only in result/client/_app/immutable/nodes: 3.d277ae9c.js
diff -r result/client/_app/version.json build/client/_app/version.json
1c1
< {"version":"1699796447956"}
\ No newline at end of file
---
> {"version":"1699796544239"}
\ No newline at end of file
Only in build/server/chunks: 1-5e15ab9a.js
Only in build/server/chunks: 1-5e15ab9a.js.map
Only in result/server/chunks: 1-84840c62.js
Only in result/server/chunks: 1-84840c62.js.map
Only in build/server/chunks: 2-586dab3d.js
Only in build/server/chunks: 2-586dab3d.js.map
Only in result/server/chunks: 2-fa581f9c.js
Only in result/server/chunks: 2-fa581f9c.js.map
Only in result/server/chunks: 3-0b2c5c5b.js
Only in result/server/chunks: 3-0b2c5c5b.js.map
Only in build/server/chunks: 3-7f356425.js
Only in build/server/chunks: 3-7f356425.js.map
diff -r result/server/index.js build/server/index.js
just the hashes are different for those. that looks file
13:53:04
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org

I got this too lily:

Only in build/client/_app/immutable/chunks: forms.cf1911ba.js
Only in result/client/_app/immutable/chunks: forms.d9f21722.js
Only in result/client/_app/immutable/chunks: singletons.9d990b5a.js
Only in build/client/_app/immutable/chunks: singletons.b4bca23b.js
Only in build/client/_app/immutable/entry: app.4750e9ea.js
Only in result/client/_app/immutable/entry: app.938a9429.js
Only in build/client/_app/immutable/entry: start.012ef946.js
Only in result/client/_app/immutable/entry: start.57a6559d.js
Only in result/client/_app/immutable/nodes: 1.3dbec856.js
Only in build/client/_app/immutable/nodes: 1.a183e2f5.js
Only in result/client/_app/immutable/nodes: 2.82332dad.js
Only in build/client/_app/immutable/nodes: 2.f3b1cddb.js
Only in build/client/_app/immutable/nodes: 3.c6c27f87.js
Only in result/client/_app/immutable/nodes: 3.d277ae9c.js
diff -r result/client/_app/version.json build/client/_app/version.json
1c1
< {"version":"1699796447956"}
\ No newline at end of file
---
> {"version":"1699796544239"}
\ No newline at end of file
Only in build/server/chunks: 1-5e15ab9a.js
Only in build/server/chunks: 1-5e15ab9a.js.map
Only in result/server/chunks: 1-84840c62.js
Only in result/server/chunks: 1-84840c62.js.map
Only in build/server/chunks: 2-586dab3d.js
Only in build/server/chunks: 2-586dab3d.js.map
Only in result/server/chunks: 2-fa581f9c.js
Only in result/server/chunks: 2-fa581f9c.js.map
Only in result/server/chunks: 3-0b2c5c5b.js
Only in result/server/chunks: 3-0b2c5c5b.js.map
Only in build/server/chunks: 3-7f356425.js
Only in build/server/chunks: 3-7f356425.js.map
diff -r result/server/index.js build/server/index.js
* just the hashes are different for those. that looks fine
13:53:06
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
would you be open to zipping up both build dirs and sharing them?
would that actually help you
13:53:20
@peter-lustig:matrix.orgpeter-lustig?13:53:22
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
would that actually help you
yes
13:53:24
@lily:lily.flowersLily Fosterso i could see what is materially different between the two13:53:33

Show newer messages


Back to Room ListRoom Version: 6