nodejs / nodejs/node-gyp

Cannot rebuild node-gyp on Node v15

Open
#2,266 5 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.7k
Forks
1.9k
Avg merge
1d 4h
Merged PRs (30d)
5

Description

  • 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 node-gyp@7.1.0
gyp info using node@15.2.1 | 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start with the reported node-gyp rebuild command, its working directory (/home/***), and whether binding.gyp exists there; compare the behavior across the mentioned Node and Python versions. Done would require a reproducible diagnosis and a clearly scoped fix or documentation update.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.