This repository was archived by the owner on Jul 1, 2026. It is now read-only.
Description Issue Summary
Looks like npm looks for a wrong location when looking for stdarg.h (I believe on a Mac its under Xcode package). The main error is:
fatal error: cannot open file '/usr/local/include/stdarg.h': Permission denied
Relevant logs or output
Full log:
✘ m@macname ~/Documents/temp/googleauth npm install sqlite3 --build-from-source
npm ERR! code 1
npm ERR! path /Users/m/Documents/temp/googleauth/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
npm ERR! LIBTOOL-STATIC Release/nothing.a
npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3380400/sqlite3.c
npm ERR! TOUCH Release/obj.target/deps/action_before_build.stamp
npm ERR! CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3380400/sqlite3.o
npm ERR! Failed to execute '/opt/homebrew/Cellar/node/18.4.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/m/Documents/temp/googleauth/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/m/Documents/temp/googleauth/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9
npm ERR! node-pre-gyp info using node@18.4.0 | darwin | arm64
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@18.4.0 | darwin | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@18.4.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/opt/homebrew/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/m/Documents/temp/googleauth/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/m/Library/Caches/node-gyp/18.4.0/include/node/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=/Users/m/Library/Caches/node-gyp/18.4.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/m/Library/Caches/node-gyp/18.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/m/Documents/temp/googleauth/node_modules/sqlite3',
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 info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@18.4.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! Release/obj/gen/sqlite-autoconf-3380400/sqlite3.c:341:10: fatal error: cannot open file '/usr/local/include/stdarg.h': Permission denied
npm ERR! #include <stdarg.h> /* Needed for the definition of va_list */
npm ERR! ^
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3380400/sqlite3.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:537: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 "/opt/homebrew/Cellar/node/18.4.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/m/Documents/temp/googleauth/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/m/Documents/temp/googleauth/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=6" "--node_napi_label=napi-v6"
npm ERR! gyp ERR! cwd /Users/m/Documents/temp/googleauth/node_modules/sqlite3
npm ERR! gyp ERR! node -v v18.4.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/18.4.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/m/Documents/temp/googleauth/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/m/Documents/temp/googleauth/node_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/m/Documents/temp/googleauth/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:537:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.5.0
npm ERR! node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/18.4.0/bin/node" "/Users/m/Documents/temp/googleauth/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/m/Documents/temp/googleauth/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v18.4.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/m/.npm/_logs/2022-06-25T07_24_07_847Z-debug-0.log
Version
5.0.8
Node.js Version
18.4.0
How did you install the library?
npm install sqlite3 --build-from-source
Reactions are currently unavailable
Issue Summary
Looks like npm looks for a wrong location when looking for
stdarg.h(I believe on a Mac its under Xcode package). The main error is:fatal error: cannot open file '/usr/local/include/stdarg.h': Permission deniedRelevant logs or output
Full log:
Version
5.0.8
Node.js Version
18.4.0
How did you install the library?
npm install sqlite3 --build-from-source