guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
138 stars 7 forks source link

Chomp fails to install on Alpine via npm #175

Open connor4312 opened 12 months ago

connor4312 commented 12 months ago

Here's what I'm trying:

/workspaces/es-module-lexer # node --version
v20.7.0
/workspaces/es-module-lexer # npm i -g chomp

changed 147 packages in 1s

6 packages are looking for funding
  run `npm fund` for details
/workspaces/es-module-lexer # chomp --help
node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/local/lib/node_modules/chomp/vendor/chomp ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /usr/local/lib/node_modules/chomp/vendor/chomp',
  path: '/usr/local/lib/node_modules/chomp/vendor/chomp',
  spawnargs: [ '--help' ]
}

Node.js v20.7.0

file reveals it's a dynamically linked binary, which doesn't run out of the box on Alpine:

/workspaces/es-module-lexer # file /usr/local/lib/node_modules/chomp/vendor/chomp
/usr/local/lib/node_modules/chomp/vendor/chomp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=73c85cd956c7a62809badf65af42c53130596b8b, for GNU/Linux 3.2.0, with debug_info, not stripped
/workspaces/es-module-lexer # ls /lib64/ld-linux-x86-64.so.2
ls: /lib64/ld-linux-x86-64.so.2: No such file or directory
guybedford commented 12 months ago

Ah, yeah this sounds like an issue that we don't support Alpine builds.

I would suggest cargo install chompbuild in this case.