derhuerst / node-sockopt

getsockopt & setsockopt for Node.js sockets.
https://github.com/derhuerst/node-sockopt#sockopt
ISC License
9 stars 2 forks source link

Error installing NPM package: "binding.gyp not found" (Ubuntu 18.04, Node 12.14.1) #3

Closed kannan-at closed 4 years ago

kannan-at commented 4 years ago

It worked for me on my Mac laptop (MacOS 10.15.5, Node 12.14.1).

It failed on our Linux servers (Ubuntu 18.04, Node 12.14.1):

$ npm add sockopt
> sockopt@1.0.2 install /home/kannan/temp/node_modules/sockopt
> node-gyp-build
gyp: binding.gyp not found (cwd: /home/kannan/temp/node_modules/sockopt) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/nodejs-binary-12.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.3.0-1017-aws
gyp ERR! command "/usr/local/nodejs-binary-12.14.1/bin/node" "/usr/local/nodejs-binary-12.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/kannan/temp/node_modules/sockopt
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sockopt@1.0.2 install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sockopt@1.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kannan/.npm/_logs/2020-05-27T21_39_24_765Z-debug.log
$ uname -a
Linux ip-172-16-2-181 5.3.0-1017-aws #18~18.04.1-Ubuntu SMP Wed Apr 8 15:12:16 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ node --version
v12.14.1
derhuerst commented 4 years ago

Thanks for reporting.

Fixed as of ce4188a85c49ff47cf2d0accf05657e1bf422ff4, published as sockopt@1.0.3.