Installation or upgrade requires all the dependencies of node-gyp
What happened?
In order to install aidex-mcp on linux, I am required to install node-gyp, make, and g++. On windows, I am required to install VisualStudio.
This makes a fairly high barrier to installation and usage.
What did you expect?
I should not compile anything from source when installing a node module.
Also, for bonus points, you should handle your peer dependencies better.
Steps to reproduce
- Execute the command:
npm install -g [email protected]
Environment
➜ ~ uname -a Linux kevin 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
➜ ~ node -v v22.22.2
Error output / logs
➜ ~ npm install -g [email protected]
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.22.4" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-c
npm warn tree-sitter-c@"^0.24.1" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.22.4" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-c
npm warn tree-sitter-c@"^0.24.1" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.21.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-cpp
npm warn tree-sitter-cpp@"^0.23.4" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.21.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-cpp
npm warn tree-sitter-cpp@"^0.23.4" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.21.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-java
npm warn tree-sitter-java@"^0.23.5" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.21.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-java
npm warn tree-sitter-java@"^0.23.5" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.22.4" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-php
npm warn tree-sitter-php@"^0.24.2" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.22.4" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-php
npm warn tree-sitter-php@"^0.24.2" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.21.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-ruby
npm warn tree-sitter-ruby@"^0.23.1" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.21.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-ruby
npm warn tree-sitter-ruby@"^0.23.1" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.22.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-rust
npm warn tree-sitter-rust@"^0.24.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.22.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-rust
npm warn tree-sitter-rust@"^0.24.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.21.0" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-typescript
npm warn tree-sitter-typescript@"^0.23.2" from [email protected]
npm warn node_modules/aidex-mcp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.21.0" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-typescript
npm warn tree-sitter-typescript@"^0.23.2" from [email protected]
npm warn node_modules/aidex-mcp
npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter
npm warn tree-sitter@"^0.25.0" from [email protected]
npm warn node_modules/aidex-mcp
npm warn aidex-mcp@"2.0.1" from the root project
npm warn 4 more (@tree-sitter-grammars/tree-sitter-hcl, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional tree-sitter@"^0.22.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-cpp/node_modules/tree-sitter-c
npm warn tree-sitter-c@"^0.23.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-cpp
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/tree-sitter
npm warn peerOptional tree-sitter@"^0.22.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-cpp/node_modules/tree-sitter-c
npm warn tree-sitter-c@"^0.23.1" from [email protected]
npm warn node_modules/aidex-mcp/node_modules/tree-sitter-cpp
npm warn deprecated [email protected]: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
npm error code 1
npm error path /usr/lib/node_modules/aidex-mcp/node_modules/tree-sitter
npm error command failed
npm error command sh -c node-gyp-build
npm error make: Entering directory '/usr/lib/node_modules/aidex-mcp/node_modules/tree-sitter/build'
npm error TOUCH Release/obj.target/../node-addon-api/node_addon_api_except.stamp
npm error CC(target) Release/obj.target/tree_sitter/vendor/tree-sitter/lib/src/lib.o
npm error rm -f Release/obj.target/tree_sitter.a Release/obj.target/tree_sitter.a.ar-file-list; mkdir -p `dirname Release/obj.target/tree_sitter.a`
npm error ar crs Release/obj.target/tree_sitter.a @Release/obj.target/tree_sitter.a.ar-file-list
npm error COPY Release/tree_sitter.a
npm error CXX(target) Release/obj.target/tree_sitter_runtime_binding/src/binding.o
npm error make: Leaving directory '/usr/lib/node_modules/aidex-mcp/node_modules/tree-sitter/build'
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | x64
npm error gyp info find Python using Python version 3.12.3 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/lib/node_modules/aidex-mcp/node_modules/tree-sitter/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/kevin/.cache/node-gyp/22.22.2/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/kevin/.cache/node-gyp/22.22.2',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/kevin/.cache/node-gyp/22.22.2/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/usr/lib/node_modules/aidex-mcp/node_modules/tree-sitter',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error make: g++: No such file or directory
npm error make: *** [tree_sitter_runtime_binding.target.mk:130: Release/obj.target/tree_sitter_runtime_binding/src/binding.o] Error 127
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/node-gyp/lib/build.js:219:23)
npm error gyp ERR! System Linux 6.8.0-111-generic
npm error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /usr/lib/node_modules/aidex-mcp/node_modules/tree-sitter
npm error gyp ERR! node -v v22.22.2
npm error gyp ERR! node-gyp -v v12.3.0
npm error gyp ERR! $npm_package_name tree-sitter
npm error gyp ERR! $npm_package_version 0.25.0
npm error gyp ERR! not ok
macOS Workaround (Darwin / Apple Silicon)
We hit the same issue on macOS 15 (Darwin 25.4) with Node 22.22.2. The C++ standard library headers exist on the system but node-gyp can't find them because Apple Clang requires the sysroot to be set explicitly.
Fix — the headers live at $SDK/usr/include/c++/v1/ but node-gyp doesn't pass -isysroot by default. Set these env vars before installing:
export SDK=$(xcrun --sdk macosx --show-sdk-path)
export SDKROOT=$SDK
export CXXFLAGS="-I$SDK/usr/include/c++/v1 -I$SDK/usr/include"
npm install aidex-mcp
Fixed in v2.2.1 (just published to npm).
Root cause: better-sqlite3@^11 ships no prebuilt binary for Node.js 24 (ABI node-v137), so prebuild-install fell through to node-gyp rebuild — which is exactly why everyone hit the toolchain requirement (VS Build Tools on Windows, the Xcode sysroot on macOS that @zlegein documented above 🙏).
Fix: bumped to better-sqlite3@^12, which adds Node 24+ prebuilds. A fresh install now downloads a ready binary on every supported platform — no compiler needed:
npm install -g [email protected]
One note: better-sqlite3@12 dropped end-of-life Node 18 from its build matrix, so the minimum Node is now 20. If you're on Node 18, please move to Node 20+ (it's past EOL anyway).
Thanks for the report and the macOS workaround — closing as resolved, but reopen if it still bites you on 2.2.1.