| 30 Aug 2025 |
Cobalt | (for context, I'm packaging jaeger-ui and they only include vite and some other deps as devDependencies of the workspace memeber packages/jaeger-ui. The build fails on calling vite in the build script of the workspace memeber as it has a /usr/bin/env node shebang and is unpatched as a consequence of landing in packages/jaeger-ui/node_modules/vite/bin/vite.js.) | 20:29:27 |
Cobalt | * Hey, does anyone know the recommended way to run patchShebangs on the node_modules of workspace members? The current implementation of buildNpmPackage only runs it once on the top-level node_modules leaving any workspace-level node_modules unpatched. This will lead to build errors if, e.g., the workspace members contain deps with shebangs, like vite.
postInstall doesn't appear to work/ be passed through so I only could get it to work as a buildPhase or configurePhase adjustment. Both of them however feel like the wrong Phase for this step. It also feels like this should be accounted for by buildNpmPackage, especially given one can explicitly specify workspace members.
| 20:30:54 |
Cobalt | * Hey, does anyone know the recommended way to run patchShebangs on the node_modules of workspace members? The current implementation of buildNpmPackage only runs it once on the top-level node_modules leaving any workspace-level node_modules unpatched. This will lead to build errors if, e.g., the workspace members contain deps with shebangs, like vite.
postInstall doesn't appear to work/ be passed through so I only could get it to work as a buildPhase or configurePhase adjustment. Both of them however feel like the wrong Phase for this step. It also seems like this should be accounted for by buildNpmPackage, especially given one can explicitly specify workspace members.
| 20:31:06 |
Cobalt | * (for context, I'm packaging jaeger-ui and they only include vite and some other deps as devDependencies of the workspace member packages/jaeger-ui. The build fails on calling vite in the build script of the workspace member as it has a /usr/bin/env node shebang and is unpatched as a consequence of landing in packages/jaeger-ui/node_modules/vite/bin/vite.js.) | 20:31:25 |
| 2 Sep 2025 |
| n3tcat joined the room. | 18:18:22 |
| n3tcat changed their display name from Stephen D to n3tcat. | 18:28:47 |
n3tcat | hai :3 I'm trying to package an npm package that depends on another npm package that itself downloads a binary. I am building that binary and want to put it into node_modules but I'm finding it's getting blown out. Here's my package.nix: https://github.com/scd31/tileserver-gl/blob/nix/nix/package.nix | 18:31:52 |
n3tcat | Wondering if anyone knows the semantics of buildNpmPackage, i.e. where it would be getting removed | 18:32:14 |
Marie | have you tried using preBuild instead of prePatch? | 18:35:20 |
n3tcat | If I do, then it falls over in the patchPhase with tileserver-gl> npm error request to https://github.com/maplibre/maplibre-native/releases/download/node-v6.2.0/node-v127-linux-x64-Release.tar.gz failed, reason: getaddrinfo EAI_AGAIN github.com | 18:37:13 |
Marie | try npmFlags = [ "--ignore-scripts" ]; | 18:40:58 |
n3tcat | trying nw | 18:41:57 |
n3tcat | * trying now | 18:41:59 |
n3tcat | * trying now | 18:42:01 |
n3tcat | oh shit it seems to be doing things | 18:43:06 |
n3tcat | ayyy making progress! | 18:45:07 |
n3tcat | tytyty ily marie | 18:45:09 |
n3tcat | actually I think I was a big premature. I think that breaks node sqlite | 18:49:41 |
n3tcat | okay so it's still running but what seems to work is npm rebuild --ignore-scripts follows by the ln -s thing followed by npm rebuild | 19:05:02 |
n3tcat | omg is worked | 19:16:08 |
n3tcat | meowwwwwwwwwwww | 19:16:12 |
| Charles joined the room. | 19:35:04 |
Charles | are general typescript/javascript + nix questions okay here or is this room strictly nodejs? | 19:40:15 |
Charles | or uh i guess maybe i don't know what actually "nodejs" is considered to mean | 19:41:20 |
Charles | i'll just ask the question: i help maintain this out-of-tree package here https://git.afnix.fr/afnix/nix-zulip and somewhere between c58ada2eda15d0576e9a2ad74bd8f2318509a40f and 20075955deac2583bb12f07151c2df830ef346b4 of nixpkgs, the build started failing with this error despite nothing in this repository changing:
+ ./tools/webpack --quiet
[webpack-cli] Failed to load '/build/zulip/web/webpack.config.ts' config
[webpack-cli] ReferenceError: exports is not defined in ES module scope
at file:///build/zulip/web/webpack.config.ts:3:23
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:450:37)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:429:47)
at loadESMFromCJS (node:internal/modules/cjs/loader:1519:24)
at Module._compile (node:internal/modules/cjs/loader:1670:5)
at Module._compile (/build/zulip/node_modules/.pnpm/pirates@4.0.6/node_modules/pirates/lib/index.js:117:24)
at node:internal/modules/cjs/loader:1820:10
at Object.newLoader [as .ts] (/build/zulip/node_modules/.pnpm/pirates@4.0.6/node_modules/pirates/lib/index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1423:32)
at Function._load (node:internal/modules/cjs/loader:1246:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Module.require (node:internal/modules/cjs/loader:1445:12)
at require (node:internal/modules/helpers:135:16)
at WebpackCLI.tryRequireThenImport (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:225:30)
at loadConfigByPath (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:1390:38)
at WebpackCLI.loadConfig (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:1490:44)
at WebpackCLI.createCompiler (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:1755:33)
at WebpackCLI.runWebpack (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:1851:31)
at Command.<anonymous> (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:920:32)
at Command.listener [as _actionHandler] (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:542:17)
at /build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1501:27)
at /build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1265:27
at Command._chainOrCall (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1386:12)
at Command._dispatchSubcommand (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1261:25)
at Command._parseCommand (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1457:19)
at Command.parseAsync (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1092:16)
at Command.<anonymous> (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:1340:32)
at Command.parseAsync (/build/zulip/node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js:1092:5)
at WebpackCLI.run (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/webpack-cli.js:1344:9)
at runCLI (/build/zulip/node_modules/.pnpm/webpack-cli@6.0.1_webpack-dev-server@5.2.0_webpack@5.98.0/node_modules/webpack-cli/lib/bootstrap.js:8:9)
Subcommand of ./tools/update-prod-static failed with exit status 2: ./tools/webpack --quiet
Actual error output for the subcommand is just above this.
and i'm curious if anyone knows off the top of their head what this is about/how to fix it
| 19:42:50 |
Charles | src would be https://github.com/zulip/zulip/tree/10.4 | 19:43:33 |
Marie | maybe this? https://github.com/nodejs/node/issues/59364 | 20:03:37 |
Marie | considering c58ada2eda15d0576e9a2ad74bd8f2318509a40f has node 22.18.0 | 20:03:49 |
| @aidalgol:tchncs.de joined the room. | 21:55:39 |
Charles | oh good find, yeah that seems likely: https://github.com/zulip/zulip/blob/10.4/tools/webpack#L18 | 23:23:23 |