Skip to content

Update nodejs/pnpm build helpers#3348

Merged
jaudiger merged 2 commits intomainfrom
update-nodejs-build
Mar 7, 2026
Merged

Update nodejs/pnpm build helpers#3348
jaudiger merged 2 commits intomainfrom
update-nodejs-build

Conversation

@jaudiger
Copy link
Contributor

@jaudiger jaudiger commented Mar 6, 2026

This PR is a prerequisite for #1884. Some Node.js based recipes embeds pre-built binaries depending on the target platform. On sometimes these binaries try to access to system librairies at runtime through the dynamic linker. When we install a binary with npmInstallGlobal() or pnpmInstallGlobal(), we wrap it with std.addRunnable since it requires to be run through node:

    return std.addRunnable(std.directory(), name, {
      command: "node",
      args: [{ relativePath: target }],
      dependencies: [nodejs],
    });

The idea is to set the LD_LIBRARY_PATH with std.addRunnable for helping the dynamic linker to find shared libraries at runtime for these pre-built binaries. I tested it locally, and it does resolve the issue for tailwindcss and github_copilot_cli on x86_64 architecture.

@jaudiger jaudiger self-assigned this Mar 6, 2026
@jaudiger
Copy link
Contributor Author

jaudiger commented Mar 6, 2026

Also I took the opportunity to uniformise all the *npmInstallGlobal helpers to take a dependencies list. Before this PR, one helper were having the possibility to set this list, now all the helpers have the same capabilities.

…o help the dynamic linker to find shared libraries

at runtime.
@jaudiger jaudiger force-pushed the update-nodejs-build branch from 20a1269 to 2a964d2 Compare March 6, 2026 19:24
@jaudiger jaudiger enabled auto-merge March 6, 2026 19:24
@jaudiger jaudiger added this pull request to the merge queue Mar 6, 2026
Merged via the queue into main with commit 83ba9c8 Mar 7, 2026
3 checks passed
@jaudiger jaudiger deleted the update-nodejs-build branch March 7, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant