[Bug 294070] misc/gemini-cli: fix gyp error on build

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 27 Mar 2026 08:17:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294070

            Bug ID: 294070
           Summary: misc/gemini-cli: fix gyp error on build
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: yuri@freebsd.org
          Reporter: nork@FreeBSD.org
          Assignee: yuri@freebsd.org
             Flags: maintainer-feedback?(yuri@freebsd.org)

Created attachment 269140
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=269140&action=edit
a patch

When /usr/local/bin/python is not installed, but installed
/usr/local/bin/python3.12, make this port causes gyp error like following:

===>  Building for gemini-cli-0.34.0
npm warn Unknown cli config "--nodedir". This will stop working in the next
major version of npm.
npm error code 1
npm error path
/usr/ports/misc/gemini-cli/work/gemini-cli-0.34.0/lib/node_modules/@google/gemini-cli/node_modules/node-pty
npm error command failed
npm error command sh -c node scripts/prebuild.js || node-gyp rebuild
npm error > Checking prebuilds...
npm error > Rebuilding because directory
/usr/ports/misc/gemini-cli/work/gemini-cli-0.34.0/lib/node_modules/@google/gemini-cli/node_modules/node-pty/prebuilds/freebsd-x64
does not exist
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@12.2.0
npm error gyp info using node@24.14.0 | freebsd | x64
npm error (node:37767) [DEP0169] DeprecationWarning: `url.parse()` behavior is
not standardized and prone to errors that have security implications. Use the
WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
npm error (Use `node --trace-deprecation ...` to show where the warning was
created)
npm error gyp ERR! find Python
npm error gyp ERR! find Python --python was not set on the command line
npm error gyp ERR! find Python Python is not set from environment variable
PYTHON
npm error gyp ERR! find Python checking if "python3" can be used
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python checking if "python" can be used
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python
npm error gyp ERR! find Python
**********************************************************
npm error gyp ERR! find Python You need to install the latest version of
Python.
npm error gyp ERR! find Python Node-gyp should be able to find and use Python.
If not,
npm error gyp ERR! find Python you can try one of the following options:
npm error gyp ERR! find Python - Use the switch
--python="/path/to/pythonexecutable"
npm error gyp ERR! find Python (accepted by both node-gyp and npm)
npm error gyp ERR! find Python - Set the environment variable PYTHON
npm error gyp ERR! find Python For more information consult the documentation
at:
npm error gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm error gyp ERR! find Python
**********************************************************
npm error gyp ERR! find Python
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Could not find any Python installation to use
npm error gyp ERR! stack at PythonFinder.fail
(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:300:11)
npm error gyp ERR! stack at PythonFinder.findPython
(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:160:17)
npm error gyp ERR! stack at process.processTicksAndRejections
(node:internal/process/task_queues:104:5)
npm error gyp ERR! stack at async configure
(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:27:18)
npm error gyp ERR! stack at async run
(/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
npm error gyp ERR! System FreeBSD 15.0-RELEASE-p5
npm error gyp ERR! command "/usr/local/bin/node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
npm error gyp ERR! cwd
/usr/ports/misc/gemini-cli/work/gemini-cli-0.34.0/lib/node_modules/@google/gemini-cli/node_modules/node-pty
npm error gyp ERR! node -v v24.14.0
npm error gyp ERR! node-gyp -v v12.2.0
npm error gyp ERR! $npm_package_name node-pty
npm error gyp ERR! $npm_package_version 1.1.0
npm error gyp ERR! not ok

-- 
You are receiving this mail because:
You are the assignee for the bug.