nodejs / nodejs/node-gyp

node 18.12.1 and node-gyp 9.3.0 is not ok

Open
#2,779 3 comments 0 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

I'm updating my project from node16 to node 18.12.1 but getting this error please assist me.
My current versions:
node: 18.12.1
npm: 9.2.0
python: 3.10

npm ERR! code 1
npm ERR! path /Users/rohail/Documents/Github/project/node_modules/desjs
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.0
npm ERR! gyp info using node@18.12.1 | darwin | x64
npm ERR! gyp info find Python using Python version 3.10.5 found at "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
npm ERR! gyp WARN read config.gypi ENOENT: no such file or directory, open '/node/src/include/node/config.gypi'
npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.10/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/rohail/.nvm/versions/node/v18.12.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/rohail/Documents/Github/project/node_modules/desjs/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/rohail/.nvm/versions/node/v18.12.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/node/src/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/node/src/',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/rohail-invozone/.nvm/versions/node/v18.12.1/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/node/src/$(Configuration)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/rohail-invozone/Documents/Github/ztn-web/node_modules/desjs',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: /node/src/common.gypi not found (cwd: /Users/rohail/Documents/Github/project/node_modules/desjs) while reading includes of binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/rohail/.nvm/versions/node/v18.12.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:325:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/Users/rohail/.nvm/versions/node/v18.12.1/bin/node" "/Users/rohail-invozone/.nvm/versions/node/v18.12.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/rohail/Documents/Github/project/node_modules/desjs
npm ERR! gyp ERR! node -v v18.12.1
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok

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

Start by reproducing the reported node-gyp rebuild failure in node_modules/desjs, then inspect its binding.gyp and the configure path shown in node-gyp/lib/configure.js. Confirm whether the missing /node/src/common.gypi is reproducible with Node 18.12.1 and node-gyp 9.3.0; done means the failure is explained and covered by an appropriate project change or guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, python
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.