Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: spawn node-gyp ENOENT #93

Open
pgupta-rgare opened this issue Dec 16, 2024 · 0 comments
Open

Error: spawn node-gyp ENOENT #93

pgupta-rgare opened this issue Dec 16, 2024 · 0 comments

Comments

@pgupta-rgare
Copy link

I am trying to replace Prebuilt with Prebuildify in one of the npm package that my team currently use. The replacement of Prebuilt with Prebuildify and node-gyp-build is mainly because of the security vulnerabilities in one of the Prebuilt's dependencies.

I have install script as mentioned below and also using 'node-gyp-build' for bindings as module.exports = require('node-gyp-build')('xmljs');

"scripts": { "install": "node-gyp-build" }

Only thing left is to have prebuilds as per the documentation. I tried to prebuilt the package using prebuildify --arch arm64 --strip but keep getting error as shown below

node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp 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 node-gyp',
  path: 'node-gyp',
  spawnargs: [
    'rebuild',
    '--target=23.0.0',
    '--devdir=/var/folders/6j/xshy7px173zb1374hmh86xj40000gr/T/prebuildify/node',
    '--arch=arm64',
    '--release'
  ]
}

Node.js v20.10.0

Can anybody help with the error?

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

No branches or pull requests

1 participant