!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

203 Members
58 Servers

Load older messages


SenderMessageTime
20 Dec 2023
@platonic.mason:matrix.orgMason Mackamananyone have experience wrangling vite?02:37:36
@adis:blad.is@adis:blad.is
In reply to @sandro:supersandro.de
for remote building it is likely still faster. Copying hundreds of derivations over is extremely slow and takes probably longer than rebuilding them.
That's only true if you're privileged enough to have a fast Internet connection.
That's not true for users in the developing world.
06:31:58
@adis:blad.is@adis:blad.isAnd faster isn't the only concern. Bytes transferred matters. 06:32:38
21 Dec 2023
@peter-lustig:matrix.orgpeter-lustig
>     at VariableDeclarator.bind (file:///build/2rdr2hwic3kd9pwpgp32s206yh5kqwhs-source/node_modules/rollup/dist/es/shared/node-entry.js:4639:23)
       >
       > ERROR: `npm build` failed

Is this some nix issue again?

I can build the project fine with npm run build

15:40:21
@peter-lustig:matrix.orgpeter-lustigbut with nix the build command seems to fail for some reason15:40:52
@peter-lustig:matrix.orgpeter-lustig

My build script (left the hash out for abbreviation):

packages.${system}.default = pkgs.buildNpmPackage {
      name = "project-build";
      src = ./.;
      installPhase = ''
        mkdir $out
        cp -r build/* $out
        cp package.json $out
        cp -r node_modules $out
      '';
    };
  };
15:42:05
@peter-lustig:matrix.orgpeter-lustig More explicitly getting is not exported by "^@virtual:$env/static/private", imported by, but I do not get this error when I only run npm run build without doing anything nix. 15:45:05
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
>     at VariableDeclarator.bind (file:///build/2rdr2hwic3kd9pwpgp32s206yh5kqwhs-source/node_modules/rollup/dist/es/shared/node-entry.js:4639:23)
       >
       > ERROR: `npm build` failed

Is this some nix issue again?

I can build the project fine with npm run build

hmmm it's unclear. can you send full build output? the error is before that
15:53:43
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
hmmm it's unclear. can you send full build output? the error is before that
yep wait
15:56:33
@peter-lustig:matrix.orgpeter-lustighttps://pastebin.com/dfAjZx0K15:58:10
@lily:lily.flowersLily Fosteruhhh why is it needing github api env vars15:58:51
@lily:lily.flowersLily Fosterduring build15:58:54
@peter-lustig:matrix.orgpeter-lustigidk15:59:33
@peter-lustig:matrix.orgpeter-lustigas mentioned15:59:36
@lily:lily.flowersLily Fostergive me a sec so i can get out my laptop15:59:41
@peter-lustig:matrix.orgpeter-lustig it does not happen when I do npm run build without nix stuff 15:59:43
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
it does not happen when I do npm run build without nix stuff
yeah but do you have github env vars set?
15:59:57
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
yeah but do you have github env vars set?
yeah in .env and then I import them with $env/static/..
16:00:19
@lily:lily.flowersLily Fosterah, but is it possible to make them not required during build?16:00:37
@lily:lily.flowersLily Fosteryou can mock up fake ones in the nix build too16:00:47
@peter-lustig:matrix.orgpeter-lustigI guess it is16:01:00
@lily:lily.flowersLily Fosterby writing a .env there or something16:01:03
@peter-lustig:matrix.orgpeter-lustignot sure16:01:05
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
you can mock up fake ones in the nix build too
could you show me how I would do that in my current flake
16:01:27
@lily:lily.flowersLily Fosteryeah, one sec. getting personal laptop out16:01:44
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
could you show me how I would do that in my current flake
the values don't matter during build right? so they could be empty strings for all your package cares?
16:03:49
@peter-lustig:matrix.orgpeter-lustigyeah i think so16:04:21
@peter-lustig:matrix.orgpeter-lustigworth a try16:04:28
@lily:lily.flowersLily Foster(dynamically grabbing them from the env when they are needed rather than importing from a virtual module would probably be more robust, and would also handle things like the env vars changing during the lifetime of the program better)16:04:51
@lily:lily.flowersLily Foster

you can do something like this though:

env = {
    GITHUB_CLIENT_ID = "";
    GITHUB_CLIENT_SECRET = "";
    ...
}
16:05:19

Show newer messages


Back to Room ListRoom Version: 6