node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

Cannot rebuild node-gyp on Node v15

Open thefrana opened this issue 4 years ago • 5 comments

  • Node Version: v15.2.1, NPM: 6.14.8
  • Platform: 5.9.9-arch1-1 SMP PREEMPT Wed, 18 Nov 2020 19:52:04 +0000 x86_64 GNU/Linux
  • Compiler: gcc version 10.2.0 (GCC)
  • Module: serialport
Verbose output (`node-gyp rebuild`):
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.8.6 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/***/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/***/.cache/node-gyp/15.2.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/***/.cache/node-gyp/15.2.1',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/***/.cache/node-gyp/15.2.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/***',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: binding.gyp not found (cwd: /home/***) 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/lib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (node:events:329:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
gyp ERR! System Linux 5.9.9-arch1-1
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/***
gyp ERR! node -v v15.2.1
gyp ERR! node-gyp -v v7.1.0
gyp ERR! not ok 

I tried downgrading NodeJS and it works in v 10, but other parts of my code cannot run under v10. I know this issues have been reported multiple times, but none of the provided solutions worked for me.

EDIT: It doesn't work under Python 3.8 and 2.7.

Thanks

thefrana avatar Nov 23 '20 19:11 thefrana

Same problem on windows 10

ghost avatar Nov 24 '20 21:11 ghost

Does /home/*** contain any non-ASCII characters?

cclauss avatar Nov 25 '20 09:11 cclauss

No, it's just /home/lukeeno/. I don't know why I deleted it, because it matches my GitHub username.

thefrana avatar Nov 26 '20 07:11 thefrana

Same here: https://github.com/nodejs/node-gyp/issues/2245

eriadam avatar Nov 27 '20 22:11 eriadam

Is this related to #2544?

cclauss avatar Dec 06 '21 10:12 cclauss