| 24 Sep 2023 |
Cobalt | * In reply to hexa
node_modules/rimraf node_modules/finalhandler/node_modules/ms node_modules/@histoire/app Error: unknown error
Caused by: [56] Failure when receiving data from the peer
Hey, I had more instances of this and similar dependency fetching errors today. Has anyone figured out (maybe Lily Foster) a workaround?
My first idea was to setup a caching NPM proxy and make the build process temporarily impure.
However this seems to be quite a bit of work and not really treat the root cause (transient fetch error, compared to a working npm install) but instead only act as a bandaid. | 18:51:22 |
| 26 Sep 2023 |
Emma [it/its] | how would one go about adding a package to a package.json at build time? | 00:22:57 |
Lily Foster | In reply to @emma:rory.gay how would one go about adding a package to a package.json at build time? Depends, why is it needed? | 10:11:59 |
Emma [it/its] | i want to add the pg library specifically in nix | 10:12:45 |
Emma [it/its] | youre "supposed to install it yourself if you want postgres" | 10:13:04 |
Lily Foster | Like the C library or some npm package? | 10:14:20 |
Emma [it/its] | the npm package | 10:14:31 |
Emma [it/its] | https://www.npmjs.com/package/pg | 10:14:50 |
Lily Foster | Oh yeah I see the package | 10:15:00 |
Lily Foster | Does it attempt to import it then and just disable stuff if it isn't present? | 10:15:28 |
Lily Foster | (At runtime) | 10:15:35 |
Emma [it/its] | no idea, its an optional runtime dependency of typeorm | 10:15:56 |
Emma [it/its] | if its not present and you try to use a postgres database, it just throws an exception stating you need to install the package | 10:16:53 |
Lily Foster | Can you link the package.json for what you are trying to package? | 10:18:15 |
Emma [it/its] | https://github.com/spacebarchat/server/blob/master/package.json | 10:18:39 |
Emma [it/its] | also see flake.nix on the dev/nix branch (i added pg there for the time being) | 10:19:21 |
Lily Foster | Yeah it's not locked at all, so you'd have to manually locked a version or just download it yourself and stick it in node_modules after configure | 10:32:29 |
Emma [it/its] | got the other maintainers to agree on adding it | 10:32:59 |
Lily Foster | It's sketch, but you should be able to buildNpmPackage for just pg and then copy ${pg}/lib/node_modules/pg to ./node_modules/pg in your derivation postConfigure | 10:33:39 |
Lily Foster | In reply to @emma:rory.gay got the other maintainers to agree on adding it Ah that works too | 10:33:45 |
Lily Foster | Probably less sketchy anyway 😅 | 10:34:10 |
Emma [it/its] | yeah | 10:35:20 |
Emma [it/its] | i was thinking of using a fetchTarball, honestly | 10:35:43 |
Lily Foster | In reply to @emma:rory.gay i was thinking of using a fetchTarball, honestly Only concern is if it has other deps that would be unmet. Also it's not a case with this one, but if they had C code build steps you'd need them to run | 10:38:13 |
Emma [it/its] | true | 10:40:08 |
| @me:indeednotjames.com changed their display name from Emily to emily. | 16:38:16 |
| 30 Sep 2023 |
| thiloho joined the room. | 21:45:27 |
thiloho | Lily Foster: Are you aware of this error? I am getting it lately and cannon figure it out.
error: builder for '/nix/store/0v4309m5kdpa2wvm9ix0v9hyf2x8cxwc-build-aurora-blog-npm-deps.drv' failed with exit code 1;
last 10 log lines:
> node_modules/sade
> node_modules/to-fast-properties
> node_modules/p-try
> node_modules/yallist
> node_modules/stdin-discarder
> node_modules/mdast-util-to-string
> Error: unknown error
>
> Caused by:
> [55] Failed sending data to the peer
For full logs, run 'nix log /nix/store/0v4309m5kdpa2wvm9ix0v9hyf2x8cxwc-build-aurora-blog-npm-deps.drv'.
error: 1 dependencies of derivation '/nix/store/rid5b0q43iqdf1anhjcf2r29w6cbi2xs-build-aurora-blog.drv' failed to build
| 21:45:46 |