gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

[bug] Node does not bundle with correct shebang/shims

Open gabyx opened this issue 3 years ago • 3 comments

Due to https://github.com/nodejs/node/issues/42367 could you always execute npm,npx inside its file directory (e.g. node-v17.7.1-linux-x64/bin ?

That would quickly solve this issue.

gabyx avatar Apr 04 '22 20:04 gabyx

Reading the bug it sounds like we should be safe though? We're putting node first on the path so the shebang should work

Although based on description it sounds like this could be the same issue as https://github.com/node-gradle/gradle-node-plugin/issues/51 which is that you need a musl build of nodejs (of which there's only unofficial-builds https://unofficial-builds.nodejs.org/download/release/v17.0.1/)

deepy avatar Apr 05 '22 09:04 deepy

Ah, really, ok. So you are saying, node is already on the path first. Hm but why then does the execution of npm not work. strange...

I try that later, thanks!

gabyx avatar Apr 05 '22 12:04 gabyx

The reason it's saying that is because you need a node built for your operating system (technically libc) So if you try running the same build but in a VM or a container running glibc instead of musl (like the docker image debian:bookworm) then you should see it working fine.

And I think if you try to run the downloaded node directly from their path you'll see the same error (even when using the binary directly)

deepy avatar Apr 06 '22 14:04 deepy