hyj1991/v8-profiler-next

Fail to install on 16 alpine

imsamurai opened this issue · 4 comments

npm 6.14.17
node v16.15.0
v8-profiler-next@1.8.0

Hi, after some update (last working version 1.6.1) i got

> v8-profiler-next@1.8.0 install /builder/node_modules/v8-profiler-next
> node scripts/install.js

Writing config.gypi:
{
  "variables": {
    "action_after_build": "true"
  }
}

node-pre-gyp install --fallback-to-build

node:child_process:902
    throw err;
    ^

<ref *1> Error: spawnSync /bin/bash ENOENT
    at Object.spawnSync (node:internal/child_process:1111:20)
    at spawnSync (node:child_process:814:24)
    at Object.execSync (node:child_process:894:15)
    at execCmd (/builder/node_modules/v8-profiler-next/scripts/build.js:20:6)
    at module.exports (/builder/node_modules/v8-profiler-next/scripts/gyp.js:28:5)
    at Object.<anonymous> (/builder/node_modules/v8-profiler-next/scripts/install.js:5:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawnSync /bin/bash',
  path: '/bin/bash',
  spawnargs: [ '-c', 'node-pre-gyp install --fallback-to-build' ],
  error: [Circular *1],
  status: null,
  signal: null,
  output: null,
  pid: 120,
  stdout: null,
  stderr: null
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-profiler-next@1.8.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-profiler-next@1.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

But alpine doesn't have bash.
I try to install bash, but after two step build i see

Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /node/service/node_modules/v8-profiler-next/build/binding/Release/node-v93-linux-x64/profiler.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)

and even if i install libc6-compat nothing changes

I'm sorry that it took so long to reply, this has been fixed by PR#52, and will be landed in v8-profiler-next@1.9.0 soon.

Try v8-profiler-next@1.9.0 please :)

Still getting the same on 1.9.0

Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/node/app/node_modules/v8-profiler-next/build/binding/Release/node-v93-linux-x64/profiler.node)

       5 | import { env } from './env';
       6 | import { logger } from './logger';
    >  7 | import profiler from 'v8-profiler-next';

Ubuntu 20.04.05 LTS
node v16

@antonandreyev npm i v8-profiler-next --build-from-source